Tiny uglify-js wrapper for gulp.
$ npm install --save-dev gulp-uglifyjs-wrapper
var gulp = require('gulp');
var uglifyWrapper = require('gulp-uglifyjs-wrapper');
gulp.task('default', function () {
return gulp.src('src/file.ext')
.pipe(uglifyWrapper({
mangle: false,
output: {
comments: /.*/g
},
outSourceMap: "main.js.map"
}))
.pipe(gulp.dest('dist'));
});
You can also pass any uglify options listed here to modify UglifyJS's behavior.
MIT © Ilya MIkhailov