Skip to content

Instantly share code, notes, and snippets.

@clemgrim
Created December 3, 2015 09:05
Show Gist options
  • Save clemgrim/5c2e6d0f0ff08eae1354 to your computer and use it in GitHub Desktop.
Save clemgrim/5c2e6d0f0ff08eae1354 to your computer and use it in GitHub Desktop.
gulp.task('js', function () {
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
return browserify('./public/js/app.js').bundle()
.pipe(source('app.js'))
.pipe(buffer())
.pipe($.ngAnnotate({single_quotes: true, add: true}))
.pipe($.if(argv.min, $.uglify()))
.pipe(gulp.dest('./public/build/js'))
.pipe($.livereload())
.pipe($.size());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment