sindresorhus / gulp-filter

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

How to filter the files which have underscore ("_") as prefix? #51

Closed kamlekar closed 8 years ago

kamlekar commented 8 years ago

This is a question but not an issue.

I am using gulp. Similar to sass, I am trying to ignore some html files which have _ as prefix. This works fine:

gulp.task('default', function () {
    return gulp
        .src('templates/!(_).html')
        .pipe(/* nunjucks compile code */)
        .dest('dist/')
}

The above code is actually ignoring the underscore prefix files from going through a compiling system (nunjucks). Because of this, I am unable to use compiling code inside the _ prefixed html files.

That is why I am planning to do the compile on all the html files but in dest, I am trying to filter out the _ prefixed html files.

Please help.

sindresorhus commented 8 years ago

Use StackOverflow for support questions.

kamlekar commented 8 years ago

Sorry, but how to inform you guys that I have a question related to this plugin?

Right now, I am tagging the question on SO with gulp-filter tag.

Here is the question