forked from krausest/js-framework-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.js
48 lines (40 loc) · 1.23 KB
/
cli.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
import { program } from "commander";
import {
checkObsoleteFrameworks,
cleanFrameworkDirectories,
configureStyles,
copyProjectToDist,
createFrameworkZipArchive,
updateLockfilesOfAllFrameworks,
} from "./cli/index.js";
program.command("zip").action(createFrameworkZipArchive);
program.command("copy").action(copyProjectToDist);
program
.command("check-obsolete")
.option("--debug [boolean]", "", false)
.action((options) => {
checkObsoleteFrameworks(options);
});
program
.command("cleanup")
.option("--frameworks-dir-path [string]", "", "frameworks")
.option("--frameworks-types [Array<string>]", "", ["keyed", "non-keyed"])
.action((options) => {
cleanFrameworkDirectories(options);
});
program
.command("update-lockfiles")
.option("--frameworks-dir-path [string]", "", "frameworks")
.option("--frameworks-types [Array<string>]", "", ["keyed", "non-keyed"])
.option("--latest-lockfile-version [number]", "", 3)
.action((options) => {
updateLockfilesOfAllFrameworks(options);
});
program
.command("configure-styles")
.option("--bootstrap [boolean]", "", false)
.option("--minimal [boolean]", "", false)
.action(async (options) => {
await configureStyles(options);
});
program.parse();