A string search plugin for gulp 3. Based on https://www.npmjs.com/package/gulp-search
First, install gulp-searchy
as a development dependency:
npm install --save-dev gulp-searchy
Then, add it to your gulpfile.js
:
var search = require('gulp-searchy');
gulp.task('templates', function(){
gulp.src([...])
.pipe(search(/foo(.{3})/g, function(item) {return item;}, {
path: '',
filename: 'a.json'
}))
.pipe(gulp.dest('...'));
});
gulp-searchy can be called with a regex.
Type: RegExp
The regex pattern to search for. See the MDN documentation for RegExp for details.
Type: Function
The formatFn function. Tell the plugin how to return the key and value for JSON file.
An optional third argument, options
, can be passed.
Type: Object
Type: string
Default: ''
Type: string
Default: 'gulp-search-manifest.json'
If you want a specific regex group to be captured
Type: integer