gulp-json-sorter
v0.0.7
Published
Sorts JSON files alphabetically and optionally renames underscores to be hyphens
Downloads
15
Readme
Gulp JSON Sorter
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'))
});