-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcli.js
31 lines (29 loc) · 918 Bytes
/
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
#!/usr/bin/env node
const yargs = require('yargs');
const build = require('./commands/build');
const deploy = require('./commands/deploy');
const watch = require('./commands/watch');
(() => {
return yargs
.command('build', 'Build theme from source.', {}, build)
.command(
'deploy [env]',
'Build theme and deploy to given environments.',
y => {
y.option('allenvs', { alias: 'a' })
.option('allow-live')
.option('nodelete', { alias: 'n' });
},
deploy
)
.command(
'watch [env]',
'Watch source files for theme updates.',
y => {
y.option('allenvs', { alias: 'a' })
.option('allow-live')
.option('notify', { alias: 'n' });
},
watch
).argv;
})();