sindresorhus / gulp-filter

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

Negative Filter #68

Closed MartinMuzatko closed 7 years ago

MartinMuzatko commented 8 years ago

Hey there!

I was looking for a way to recursively filter folders based on a name and then merge it back in with gulp-rename. Unfortunately, it seems like I'm terrible with globs or I miss some details.

This is my setup:

gulp.task('gen', () => {
    return gulp.src('src/**/*')
        .pipe(filter(['*', '!**/_wkc']))
        .pipe(gulp.dest('./dist'));
})

This looks easy, but I never get the right setup.

I'm fiddling around with this for hours now.

Thanks a lot in advance

sindresorhus commented 7 years ago

Support questions are better asked on Stack Overflow: http://stackoverflow.com/questions/tagged/gulp Paste in the link to the question here so others can follow ;)