1 | import program from 'commander'
|
2 | import { VERSION } from './utils/constants'
|
3 | import create from './create'
|
4 |
|
5 | program.command('create')
|
6 | .description('create d2-admin template')
|
7 | .alias('c')
|
8 | .action(() => {
|
9 | create()
|
10 | })
|
11 |
|
12 | program.command('doc')
|
13 | .description('d2-admin doc')
|
14 | .alias('d')
|
15 | .action(() => {
|
16 | console.log('Document: https://d2-projects.github.io/d2-admin-doc/')
|
17 | console.log('中文文档: https://d2-projects.github.io/d2-admin-doc/zh/')
|
18 | })
|
19 |
|
20 | program.version(VERSION,'-v --version').parse(process.argv)
|