Skip to content

Commit 3ce9876

Browse files
authored
Merge pull request #1 from PhyrexTsai/master
Update kaizen
2 parents 6160c57 + 0d27014 commit 3ce9876

File tree

2 files changed

+36
-23
lines changed

2 files changed

+36
-23
lines changed

Diff for: README.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
npm i kaizen-cli -g
66
```
77

8+
## Command Topics
9+
10+
- `kaizen dapp` -
11+
- `kaizen config` -
12+
- `kaizen build` -
13+
- `kaizen publish` -
814

915
- Create a project:
1016
```

Diff for: kaizen

+30-23
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
#!/usr/bin/env node
22
const creatrDapp = require(".//lib/CreateDapp");
3-
const argv = require('yargs').command('dapp', 'create a file', (yargs)=> {
4-
return yargs
5-
.option('name', {
6-
alias: 'n',
7-
describe: 'clone a file'
8-
})
9-
.option('type', {
10-
alias: 't',
11-
describe: 'f2e framework type vue or react',
12-
choices: ['vue', 'react'],
13-
default: 'vue'
14-
})
15-
.demandOption(['name'], '請輸入創建文件名字')
16-
.example(
17-
'kaizen dapp -n <package name> -t <vue or react>',
18-
'git clone 模板'
19-
)
20-
},
21-
(argv)=> {
22-
const {name, type} = argv;
23-
creatrDapp({name, type});
24-
}
25-
).argv;
3+
const argv = require('yargs')
4+
.usage('Kaizen v0.0.1 - a dapp framework for Blockchain\n\nUsage: $0 <command> [options]')
5+
.command('dapp', 'create a file', (yargs) => {
6+
return yargs
7+
.option('name', {
8+
alias: 'n',
9+
describe: 'clone a file'
10+
})
11+
.option('type', {
12+
alias: 't',
13+
describe: 'f2e framework type vue or react',
14+
choices: ['vue', 'react'],
15+
default: 'vue'
16+
})
17+
.demandOption(['name'], '請輸入創建文件名字')
18+
.example(
19+
'kaizen dapp -n <package name> -t <vue or react>',
20+
'git clone 模板'
21+
)
22+
},
23+
(argv) => {
24+
const { name, type } = argv;
25+
creatrDapp({ name, type });
26+
}
27+
)
28+
.help('h')
29+
.alias('h', 'help')
30+
.alias('v', 'version')
31+
.epilog('copyright Portal Network 2018')
32+
.argv;

0 commit comments

Comments
 (0)