gulp-json-sorter

0.0.7 • Public • Published

Gulp JSON Sorter

gulp-json-sorter build status

Sorts JSON files alphabetically and optionally renames underscores to be hyphens.

NPM Install

npm i gulp-json-sorter

Basic Example

var jsonSorter = require('gulp-json-sorter');
 
gulp.task('sort', function () {
 
  return gulp.src(['file1.json', 'file2.json'])
    .pipe(jsonSorter())
    .pipe(gulp.dest('/output'))
 
});

With Rename Enabled

var jsonSorter = require('gulp-json-sorter');
 
gulp.task('sort', function () {
 
  return gulp.src(['file1.json', 'file2.json'])
    .pipe(jsonSorter({
        rename: true
      }))
    .pipe(gulp.dest('/output'))
 
});

Readme

Keywords

none

Package Sidebar

Install

npm i gulp-json-sorter

Weekly Downloads

2

Version

0.0.7

License

MIT

Last publish

Collaborators

  • crivas