sindresorhus / gulp-filter

Filter files in a `vinyl` stream
MIT License
315 stars 37 forks source link

Filtered stream never ending #58

Closed saponifi3d closed 8 years ago

saponifi3d commented 8 years ago

First of all, thanks so much for this contribution, I <3 the project.

My issue is I have a filtered stream that i'm running async tasks on, and because it never calls done on those tasks, so the gulp task never finishes. I see in the docs that this is expected, but would it be possible to turn the filter.restore into a stream that automatically ends like gulp.src streams?

I have a universal js app that I'm trying to file rev all the files that are going to a CDN, then spilt off the server files and put them into a dist folder, then upload the rest of the assets to a CDN. The CDN assets are the ones being filtered out, and that stream is never ending. To finish the task I re-merge the streams and return that so gulp will wait until both tasks are completed before it finishes the task. Any other thoughts or suggestions on how to fix this are more than welcome.

saponifi3d commented 8 years ago

Bump ?

nfroidure commented 8 years ago

Have a look to the passthrough option, i think it'll fullfil your needs. https://github.com/sindresorhus/gulp-filter#restore-as-a-file-source