Skip to content

Commit

Permalink
refactor(listable): Allow override of options group name
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Nov 7, 2019
1 parent e7ef2a7 commit 003ea8b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions utils/listable/lib/listable-options.js
Expand Up @@ -2,43 +2,43 @@

module.exports = listableOptions;

function listableOptions(yargs) {
function listableOptions(yargs, group = "Command Options:") {
return yargs.options({
json: {
group: "Command Options:",
group,
describe: "Show information as a JSON array",
type: "boolean",
},
ndjson: {
group: "Command Options:",
group,
describe: "Show information as newline-delimited JSON",
type: "boolean",
},
a: {
group: "Command Options:",
group,
describe: "Show private packages that are normally hidden",
type: "boolean",
alias: "all",
},
l: {
group: "Command Options:",
group,
describe: "Show extended information",
type: "boolean",
alias: "long",
},
p: {
group: "Command Options:",
group,
describe: "Show parseable output instead of columnified view",
type: "boolean",
alias: "parseable",
},
toposort: {
group: "Command Options:",
group,
describe: "Sort packages in topological order instead of lexical by directory",
type: "boolean",
},
graph: {
group: "Command Options:",
group,
describe: "Show dependency graph as a JSON-formatted adjacency list",
type: "boolean",
},
Expand Down

0 comments on commit 003ea8b

Please sign in to comment.