0.0.7 • Published 9 years ago

gulp-json-sorter v0.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

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

});