-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
34 lines (29 loc) · 997 Bytes
/
Copy pathcli.js
File metadata and controls
34 lines (29 loc) · 997 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
// @ts-check
import { program } from "commander";
import { cleanFrameworkDirectories } from "./cli/cleanup.js";
import { rebuildAllFrameworks } from "./cli/rebuild-all-frameworks.js";
import { rebuildFrameworks } from "./cli/rebuild-build-single.js";
program
.command("cleanup")
.description("Clean app directories of package-lock.json, yarn-lock, node_modules, and dist output")
.option("--apps-dir-path [string]", "", "apps")
.action((options) => {
cleanFrameworkDirectories(options);
});
program
.command("build-all")
.option("--ci [boolean]", "", false)
.option("--restart-with-app [string]", "", "")
.action((options) => {
rebuildAllFrameworks({ restartWithApp: options.restartWithApp, useCi: options.ci });
});
program
.command("build-apps")
.option("-f, --apps [apps...]", "", [])
.option("--ci [boolean]", "", false)
.action((options) => {
if (!rebuildFrameworks(options.apps, options.ci)) {
process.exit(1);
}
});
program.parse();