1.0.1 • Published 10 years ago

gulp-to-json v1.0.1

Weekly downloads
295
License
MIT
Repository
github
Last release
10 years ago

gulp-to-json Build Status

Create json file from source files passed to

Install

npm install --save-dev gulp-to-json

Example

var gulp = require('gulp');
var toJson = require('gulp-to-json');

gulp.task('tojson', function () {
  gulp.src('./public/*.html')
  .pipe(toJson());
});
var gulp = require('gulp');
var toJson = require('gulp-to-json');

gulp.task('tojson', function () {
  gulp.src('./public/*.html')
  .pipe(toJson({
    strip: /^.+\/?\\?public\/?\\?/ //create just file names by removing everything from left of public/ folder 
  }));
});

This will create output.json file in which will be all the html files from public folder.

Options

filename

Type: String
Default: 'output.json'

Filename where to save json file

relative

Type: Boolean
Default: 'false'

If the relative urls should be used

strip

Type: Regexp or String
Default: false

Pattern to strip from the files urls.

License

MIT © Daniel Husar

1.0.1

10 years ago

1.0.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago