addyosmani / addyosmani/starter

Use gulp-if instead of gulp-filter

Open
#1 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
144
Forks
14
PR merge metrics
No merged PRs in 30d

Description

``` js
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

``` js
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.