Skip to content

kressnick25/roast

 
 

Repository files navigation

roast 🔥

Command line app to deep sort JSON files.

roast is an implementation of codesen/jsonsort-cli written in Rust using serde.

Installation

Download the latest build for your platform from Releases. Simply drop the executable into a location in your PATH.

Usage

$ roast file1.json folder1/folder2/**/*.* folder3 -s
$ roast -t -n -s *
$ roast -s yourspecialfolder

$ roast -v
$ roast --version
$ roast -h
$ roast --help

Ignored files/directories

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/

Flags

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

Roadmap

See enhancement Issues

Acknowledgements

License

MIT

About

Rust implementation of codsed/json-sort-cli

Resources

License

Stars

Watchers

Forks

Languages

  • JavaScript 60.9%
  • Rust 39.1%