Created
February 6, 2015 15:10
-
-
Save NickTomlin/bf74fa41d0bfb45a7281 to your computer and use it in GitHub Desktop.
pseudo coded gulp helper function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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