-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·54 lines (46 loc) · 1.16 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
52
53
54
#!/usr/bin/env node
const program = require('commander')
const init = require('./cli/init')
const version = require('./cli/version')
const help = require('./cli/help')
const config = require('./cli/config')
const activate = require('./cli/activate')
const deactivate = require('./cli/deactivate')
const status = require('./cli/status')
program
.command('init')
.alias('i')
.description('init omnis project')
.action(() => init())
program
.command('version')
.alias('v')
.description('omnis-cli version')
.action(() => version())
program
.command('help')
.alias('h')
.description('omnis-cli help')
.action(() => help())
program
.command('config')
.alias('c')
.arguments('<key> [value]')
.description('change default values')
.action((key, val) => config(key, val))
program
.command('activate')
.alias('a')
.description('activate omnis application')
.action(() => activate())
program
.command('deactivate')
.alias('d')
.description('deactivate omnis application')
.action(() => deactivate())
program
.command('status')
.alias('s')
.description('check application status')
.action(() => status())
program.parse(process.argv)