gulp-content-filter
v0.0.0
Published
Gulp plugin to filter files by content
Downloads
11
Readme
gulp-content-filter
Gulp plugin to filter by file content
Usage
var gulp = require('gulp');
var contentFilter = require('gulp-content-filter');
//Only filter files matching this filename, this is optional
var contentFilterParams = {
pattern: /\.spec\.js$/
};
//Only include files whos content matches this regex
contentFilterParams.include = new RegExp('//include me!\\s');
//Exclude files whos content matches this regex
contentFilterParams.exclude = new RegExp('//exclude me!\\s');
gulp.src('./**/*.js')
.pipe(contentFilter(contentFilterParams)
.pipe(allYourOtherPlugins());