-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbiwa-cli.js
63 lines (61 loc) · 1.25 KB
/
biwa-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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env node
const Biwa = require("./lib/biwa");
console.log("Coba `biwa --help` untuk opsi penggunaan");
require("yargs")
.usage("Gunakan $0 <command> [options]")
.command(
"new [path]",
"Membuat web app Biwa baru",
yargs => {
yargs.positional("path", {
describe: "Path ke web app Kamu (contoh. ~/path/my_app)"
});
},
argv => {
new Biwa(argv.path).create();
}
)
.command(
"destroy [path]",
"Menghapus Biwa app",
yargs => {
yargs.positional("path", {
describe: "Path ke web app Kamu yang sudah ada (contoh. ~/path/my_app)"
});
},
argv => {
new Biwa(argv.name).destroy();
}
)
.command(
"dev",
"Mulai server web dan perhatikan basis kode untuk perubahan",
() => {},
argv => {
Biwa.dev();
}
)
.command(
"build",
"Membangun aset siap produksi ke dalam /publish",
() => {},
argv => {
Biwa.build();
}
)
.command(
"serve",
"Memulai server web untuk melayani direktori /publish",
() => {},
argv => {
Biwa.serve();
}
)
.command(
"netlify",
"Memulai instance dev netlify untuk pengujian fungsi lokal",
() => {},
argv => {
Biwa.netlify();
}
).argv;