-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy patharguments.ts
More file actions
40 lines (38 loc) · 985 Bytes
/
arguments.ts
File metadata and controls
40 lines (38 loc) · 985 Bytes
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
import yargs from "yargs";
import signale from "signale";
const args = yargs(process.argv)
.command(
"init",
"Generate a placeholder `build.ts` file",
() => {},
() => {
signale.info("Generating placeholder file");
}
)
.option("verbose", {
alias: "v",
type: "boolean",
description: "Show detailed logs",
})
.option("message", {
alias: "m",
type: "string",
description: "Specify a build message",
})
.option("no-git", {
alias: "g",
type: "boolean",
description: "Specify to skip git information",
})
.option("package-json", {
alias: "p",
type: "string",
description: "Specify location of `package.json`",
})
.option("output-file", {
alias: "o",
type: "string",
description: "Specify location of generated `build.ts` file",
})
.help().argv;
export default args;