gulp-grep-contents
v0.0.1
Published
Filter a gulp stream by file contents
Downloads
118
Readme
gulp-grep-contents
Gulp plugin for filtering files based on a regular expression matching their contents.
Usage
var grepContents = require('gulp-grep-contents');
gulp.src(['./templates/*.hbs'])
.pipe(grepContents(/<head>/))
.pipe(gulp.dest('./headers'));
Inverted
var grepContents = require('gulp-grep-contents');
gulp.src(['./templates/*.hbs'])
.pipe(grepContents(/<head>/, {inverted: true}))
.pipe(gulp.dest('./body'));