gulp-regex-json
v1.0.1
Published
Search files for a regular expression then put it in a JSON file
Downloads
171
Readme
Gulp: Regex to JSON
Search files for a regular expression then put it in a JSON file
Installation
Install package with NPM and add it to your development dependencies:
npm install --save-dev gulp-regex-json
Usage
var json = require('gulp-regex-json');
gulp.task('regex2json', function() {
var regex = /([A-Za-z\-]+)'/g;
return gulp.src('./lib/*.js')
.pipe(json({
regex: regex,
file: 'output.json'
}))
.pipe(gulp.dest('./dist/'));
});