/
listable-options.js
46 lines (44 loc) · 1.03 KB
/
listable-options.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"use strict";
module.exports = listableOptions;
function listableOptions(yargs, group = "Command Options:") {
return yargs.options({
json: {
group,
describe: "Show information as a JSON array",
type: "boolean",
},
ndjson: {
group,
describe: "Show information as newline-delimited JSON",
type: "boolean",
},
a: {
group,
describe: "Show private packages that are normally hidden",
type: "boolean",
alias: "all",
},
l: {
group,
describe: "Show extended information",
type: "boolean",
alias: "long",
},
p: {
group,
describe: "Show parseable output instead of columnified view",
type: "boolean",
alias: "parseable",
},
toposort: {
group,
describe: "Sort packages in topological order instead of lexical by directory",
type: "boolean",
},
graph: {
group,
describe: "Show dependency graph as a JSON-formatted adjacency list",
type: "boolean",
},
});
}