-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
executable file
·52 lines (51 loc) · 1.2 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
#!/usr/bin/env node
require('yargs')
.command({
command: ['new [name]'],
desc: 'Create a new project',
handler: require('./src/new'),
builder: yargs => {
yargs
.option('lib', {
demandOption: false,
default: false,
type: 'boolean'
})
.option('web', {
demandOption: false,
default: false,
type: 'boolean'
})
.option('node', {
demandOption: false,
default: false,
type: 'boolean'
})
}
})
.command({
command: ['run'],
desc: 'Build and execute.',
handler: require('./src/scripts/run')
})
.command({
command: ['test'],
desc: 'Run the tests.',
handler: require('./src/scripts/test')
})
.command({
command: ['init'],
desc: 'Create a new package in an existing directory.',
handler: require('./src/init')
})
.command({
command: ['build'],
desc: 'Compile the current project.',
handler: require('./src/scripts/build')
})
// .command({
// command: ['check'],
// desc: 'Analyze the current project, report syntax errors and fix it.',
// handler: require('./src/scripts/check')
// })
.parse()