Command line app to deep sort JSON files.
roast is an implementation of codesen/jsonsort-cli written in Rust using serde.
Download the latest build for your platform from Releases. Simply drop the executable into a location in your PATH.
$ roast file1.json folder1/folder2/**/*.* folder3 -s
$ roast -t -n -s *
$ roast -s yourspecialfolder
$ roast -v
$ roast --version
$ roast -h
$ roast --help
The following will be not be processed:
node_modules/
package.json
package_lock.json
package-lock.json
npm-debug.log
npm-shrinkwrap.json
config.gypi
.lock-wscript
.DS_Store
.svn/
CVS/
Use roast --help
to list available flags.
short | long | description |
---|---|---|
-a | --arrays | Also sort any arrays if they contain only string elements |
-d | --dry | Only list all the files to be processed |
-g | --git | Sort any JSON files tracked by git, that have a modified status. Will not modify any untracked, staged, or ignored files |
-i | --indentationCount | How many spaces/tabs to use (default: 2 -> spaces, 1 -> tabs) |
-l | --lineEnding | Set to "cr", "crlf" or "lf". Otherwise, the original line ending of the file is used |
--silent | Suppress output | |
-s | --spaces | Use spaces for JSON file indentation (default uses tabs) |
-v | --verbose | Enable verbose output for debugging |
-h | --help | Print help |
-V | --version | Print version |
See enhancement Issues