forked from remake/remake-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·51 lines (41 loc) · 1.25 KB
/
index.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
49
50
51
const program = require("commander");
const Configstore = require("configstore");
const {
deploy,
backup,
updateFramework,
create,
linkDomain,
} = require("./utils/commands");
const { version, name } = require("./package.json");
log = console.log;
remakeCliConfig = new Configstore(name, { user: {} });
remakeServiceHost = "https://remakeapps.com";
program
.version("v" + version, "-v, --version", "output the current version")
.name("remake")
.usage("command [--help]");
program
.command("create <projectDir>")
.description("Create a new Remake project")
.option("-m, --multitenant", "create a multi tenant Remake app")
.action((projectDir, options) => create(projectDir, options));
program
.command("update-framework")
.description("Update the Remake framework in your project")
.action(() => updateFramework());
program
.command("deploy")
.description("Deploy your Remake app on the Remake server")
.action(() => deploy());
program
.command("backup")
.description("Backup the deployed version of your app")
.action(() => backup());
program
.command("custom-domain")
.description("Link a custom domain to your application")
.action(() => linkDomain());
module.exports = async () => {
program.parse(process.argv);
};