un-prettify json output, update docs
This commit is contained in:
parent
fd8af7bcdf
commit
16372cd6e6
@ -64,10 +64,10 @@ minimist ^1.0.0 ^1.2.0
|
||||
```
|
||||
### JSON Output
|
||||
|
||||
`updates` can output JSON. The result is always an object with the key `results` and depending on operation, `message` and `error` properties can also be present.
|
||||
The JSON output is an option with possible properties `results`, `message` and `error`:
|
||||
|
||||
```console
|
||||
$ updates -j
|
||||
$ updates -j | jq
|
||||
{
|
||||
"results": {
|
||||
"chalk": {
|
||||
|
@ -208,7 +208,7 @@ function finish(obj, opts) {
|
||||
if (!hadError) {
|
||||
output.results = deps;
|
||||
}
|
||||
console.info(JSON.stringify(output, null, 2));
|
||||
console.info(JSON.stringify(output));
|
||||
} else {
|
||||
if (Object.keys(deps).length && !hadError) {
|
||||
console.info(formatDeps(deps));
|
||||
|
Loading…
Reference in New Issue
Block a user