Skip to content

EdtechFoundry/gulp-content-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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());
    

About

Gulp plugin to filter by file content

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published