Skip to content

Instantly share code, notes, and snippets.

@YOzaz
Created October 14, 2015 10:11
Show Gist options
  • Save YOzaz/207ac77aae835ce19f7d to your computer and use it in GitHub Desktop.
Save YOzaz/207ac77aae835ce19f7d to your computer and use it in GitHub Desktop.
var uglify = require('gulp-uglify');
var bytediff = require('gulp-bytediff');
var rename = require('gulp-rename');
gulp.task('prod', ['app'], function() {
return gulp.src('public/src/app.js')
.pipe(plumber())
.pipe(bytediff.start())
.pipe(uglify({mangle: true}))
.pipe(bytediff.stop())
.pipe(rename('app.min.js'))
.pipe(plumber.stop())
.pipe(gulp.dest('public/src/'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment