Skip to content Skip to sidebar Skip to footer

Gulp-filter Filters Out All Files

I'm working on moving my workflow over to Gulp, and I'm loving it so far; however, I seem to have misunderstood something about how the gulp-filter plugin works... I have the follo

Solution 1:

OK, so I've found the reason for this behavior:

gulp-filter uses the multimatch module behind the scenes, and it uses Vinyl file objects for the files it reads, and it passes File.relative to the multimatch function (which is the relative path in relation to File.base, which is equal to the first glob). So when I used 'bower_components/foundation/scss/normalize.scss' as a glob File.relative only contained the file name, and 'bower_components/foundation/scss/normalize.scss' doesn't match 'normalize.scss'.

Solution 2:

Your pipeline is way too long and attempt to process unrelated things.

I'd rather start a pipeline per type of asset in different tasks running in parallel.

Post a Comment for "Gulp-filter Filters Out All Files"