A plugin to scan a file for a string or expression
$ npm install --save-dev gulp-scan
var gulp = require('gulp');
var scan = require('gulp-scan');
gulp.task('default', function () {
return gulp.src('src/file.ext')
.pipe(scan({ term: '@import', fn: function (match) {
// do something with {String} match
}}));
});
Type: string
or RegExp
A term to scan the file for. Can be either a string or regular expression.
Type: Function
A function that will receive the individual matches found in a file.
MIT © Gilt Groupe