Compact JSON formatter for the command line
yarn global add https://github.com/kriswill/json-fmt
This will create a global command json-fmt
cat package.json | json-fmt
Emits formatted JSON to stdout, pipe to new files as you please..
echo "$(cat my.json | json-fmt)" >| my.json
Replaces my.json
file with formatted JSON content