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