1 | #!/usr/bin/env node
|
2 |
|
3 | const program = require("commander");
|
4 | const pkg = require("../package");
|
5 |
|
6 | program
|
7 | .version(pkg.version)
|
8 | .command("size", "add module size to .size-snapshot.json", {
|
9 | executableFile: "size"
|
10 | })
|
11 | .command("types", "add the common.d.ts file to the generated types", {
|
12 | executableFile: "types"
|
13 | })
|
14 | .command("test", "run tests using jest", {
|
15 | executableFile: "test"
|
16 | })
|
17 | .command(
|
18 | "chain-commands <cmd1> <cmd2>",
|
19 | "start the first npm command and while it's running it execute the second npm command",
|
20 | {
|
21 | executableFile: "chain-commands"
|
22 | }
|
23 | )
|
24 | .parse(process.argv);
|