forked from lerna/lerna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
50 lines (46 loc) · 1.32 KB
/
index.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
47
48
49
50
"use strict";
module.exports = globalOptions;
function globalOptions(yargs) {
// the global options applicable to _every_ command
const opts = {
loglevel: {
defaultDescription: "info",
describe: "What level of logs to report.",
type: "string",
},
concurrency: {
defaultDescription: "4",
describe: "How many processes to use when lerna parallelizes tasks.",
type: "number",
requiresArg: true,
},
"reject-cycles": {
describe: "Fail if a cycle is detected among dependencies.",
type: "boolean",
},
progress: {
defaultDescription: "true",
describe: "Enable progress bars. (Always off in CI)\nPass --no-progress to disable.",
type: "boolean",
},
sort: {
defaultDescription: "true",
describe: "Sort packages topologically (dependencies before dependents).\nPass --no-sort to disable.",
type: "boolean",
},
"max-buffer": {
describe: "Set max-buffer (in bytes) for subcommand execution",
type: "number",
requiresArg: true,
},
};
// group options under "Global Options:" header
const globalKeys = Object.keys(opts).concat(["help", "version"]);
return yargs
.options(opts)
.group(globalKeys, "Global Options:")
.option("ci", {
hidden: true,
type: "boolean",
});
}