Closed shama closed 10 years ago
I saw that uglify was used twice in the readme example, once as a var and again as a function. So I updated to:
uglify
var uglify = require('uglify-js') var map = require('vinyl-map') var gulp = require('gulp') gulp.task('minify', function() { return gulp.src('index.js') .pipe(minify) .pipe(gulp.dest('./dist')) }) var minify = map(function(code, filename) { return uglify.minify(code, { fromString: true }) })
But thought it could even be simpler with the proposed changes. Cheers!
Nice catch, thanks @shama! :)
I saw that
uglify
was used twice in the readme example, once as a var and again as a function. So I updated to:But thought it could even be simpler with the proposed changes. Cheers!