Skip to content

Instantly share code, notes, and snippets.

@NickTomlin
Created February 6, 2015 15:10
Show Gist options
  • Save NickTomlin/bf74fa41d0bfb45a7281 to your computer and use it in GitHub Desktop.
Save NickTomlin/bf74fa41d0bfb45a7281 to your computer and use it in GitHub Desktop.
pseudo coded gulp helper function
function buildJs () {
// bify returns a vinyl-source-stream wrapped browserify bundle
var browserified = bify();
return gulp.src(SRC.js)
.pipe(browserified)
.pipe(size());
}
gulp.task('js', function () {
return buildJs()
.pipe('dist');
});
gulp.task('js:production', function () {
return buildJs()
.pipe(uglify())
.pipe(size())
.pipe('dist');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment