gulp.task('sometask', function () {
var jsFilter = $.filter('**/*.js');
return gulp.src('app/*.html')
.pipe(jsFilter)
.pipe(uglify())
.pipe(jsFilter.restore())
.pipe(otherstuff)
.pipe(gulp.dest('stuff'))
});
becomes
gulp.task('sometask', function () {
return gulp.src('app/*.html')
.pipe(gif('*.js', uglify()))
.pipe(otherstuff)
.pipe(gulp.dest('stuff'))
});
gulp-if provides a nice way to apply portions of the pipeline only when the file matches a regex, function, glob, boolean, etc.
becomes
gulp-if provides a nice way to apply portions of the pipeline only when the file matches a regex, function, glob, boolean, etc.