npm

gulp-regex-json

1.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i gulp-regex-json

Weekly Downloads

47

Version

1.0.1

License

ISC

Unpacked Size

2.46 kB

Total Files

3

Last publish

Collaborators

  • benjamin.netter
  • jguepin
  • alteyss