1 |
|
2 | ;
|
3 | const res = require("./");
|
4 | function getProjectPath(p) {
|
5 | return p ? p : ".";
|
6 | }
|
7 | var command = process.argv[2];
|
8 | switch (command) {
|
9 | case "upgrade":
|
10 | var p = getProjectPath(process.argv[3]);
|
11 | res.upgrade.run(p).catch(e => console.log(e));
|
12 | break;
|
13 | default:
|
14 | var p = getProjectPath(command);
|
15 | res.build.build(p).catch(e => console.log(e.stack));
|
16 | break;
|
17 | }
|