mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(cli): add --version option
This commit is contained in:
parent
ef1916c320
commit
fa9a64b480
@ -1,6 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
import { command, parse, version } from 'commander';
|
||||
|
||||
import { command, parse } from 'commander';
|
||||
// @ts-ignore
|
||||
import packageJson from '../package.json';
|
||||
|
||||
// commands
|
||||
import { dev } from './commands/dev';
|
||||
import { lint } from './commands/lint';
|
||||
import { test } from './commands/jest';
|
||||
@ -11,6 +15,8 @@ import { changelog } from './commands/changelog';
|
||||
import { buildSite } from './commands/build-site';
|
||||
import { commitLint } from './commands/commit-lint';
|
||||
|
||||
version(`@vant/cli ${packageJson.version}`);
|
||||
|
||||
command('dev')
|
||||
.description('Run webpack dev server')
|
||||
.action(dev);
|
||||
|
Loading…
x
Reference in New Issue
Block a user