Skip to content

Search files for a regular expression then put it in a JSON file

Notifications You must be signed in to change notification settings

o5r/gulp-regex-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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/'));
});

About

Search files for a regular expression then put it in a JSON file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published