-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
69 lines (56 loc) · 1.02 KB
/
index.ts
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env node
/* eslint-disable no-fallthrough */
"use strict";
import {
compile,
format,
help,
init,
lint,
run,
test,
testTranspileOnly
} from "./scripts";
const args = process.argv.slice(2);
const scriptName = args[0];
if (!scriptName) {
console.error(
"Please pass a script name as an argument to @cdimitroulas/typescript-scripts"
);
process.exit(1);
}
switch (scriptName) {
case "init":
init();
process.exit(0);
case "compile": {
const status = compile();
process.exit(status);
}
case "format": {
const status = format();
process.exit(status);
}
case "help":
help();
process.exit(0);
case "lint": {
const status = lint();
process.exit(status);
}
case "run": {
const status = run();
process.exit(status);
}
case "test": {
const status = test();
process.exit(status);
}
case "test:transpileOnly": {
const status = testTranspileOnly();
process.exit(status);
}
default:
help();
process.exit(1);
}