UNPKG

532 BJavaScriptView Raw
1import program from 'commander'
2import { VERSION } from './utils/constants'
3import create from './create'
4
5program.command('create')
6 .description('create d2-admin template')
7 .alias('c')
8 .action(() => {
9 create()
10 })
11
12program.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
20program.version(VERSION,'-v --version').parse(process.argv)