§ Use it
Once installed, call jsoncomb
in the terminal with list of a file or folder paths, using globs, for example:
$ jsoncomb --normalise "index.json"
$ jsoncomb -n "data/**/index.json" -i "data/defaults.json"
$ jsoncomb -n "**/*.json" -t
$ jsoncomb -v
$ jsoncomb --version
$ jsoncomb -h
$ jsoncomb --help
§ API - flags
short | long | description |
---|---|---|
-n | --normalise | Normalise all files in the given set |
-i | --ignore | Ignore paths if they contain only placeholder values |
-t | --tabs | Use tabs instead of default 2 spaces for JSON indentation |
-v | --version | Shows the installed version of your json-sort-cli |
-h | --help | Shows (similar to this) help |
§ Normalise
$ jsoncomb --normalise "index.json"
$ jsoncomb -n "data/**/index.json" -i "data/defaults.json"
§ Changelog
See it in the monorepo , on Sourcehut.
§ Licence
Copyright © 2010–2020 Roy Revelt and other contributors
Related packages:
📦 json-variables 9.0.3
Resolves custom-marked, cross-referenced paths in parsed JSON
📦 json-sort-cli 1.17.1
Command line app to deep sort JSON files, retains package.json special key order
📦 json-comb-core 6.7.1
The inner core of
json-comb