Reputation: 31
What is the difference between "gulp-browserify
" and "uglify.minify
". Both are used to minify the files. I am trying to compress a group of JS file to a single file both serves good which is preferable.
Upvotes: 3
Views: 1629
Reputation: 63524
gulp-browserify (which is no longer being maintained by the way) is used to concatenate (or to use the browserify vernacular "bundle") application files that have been written using commonJS
in order to use them in the browser (which otherwise you wouldn't be able to do). The browserify application itself doesn't appear to actually have a minify option, but there is a plugin you can use that does minify the files after they have been bundled.
Uglify will just minify "normal" JavaScript files. If you want them concatenated then you would also need to add something like gulp-concat to your gulp configuration in order to do that.
Upvotes: 4