Skip to content

codebend3r/gulp-json-sorter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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({
        toCamelCase: true
      }))
    .pipe(gulp.dest('/output'))

});

deprecated notice rename option has been deprecated, use toCamelCase instead

About

Sorts json alphabetically and recursively

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published