gulp-json-sorter

Sorts JSON files alphabetically and optionally renames underscores to be hyphens

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
gulp-json-sorter
000.0.79 years ago9 years agoMinified + gzip package size for gulp-json-sorter in KB

Readme

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'))

});