mirror of
https://github.com/youzan/vant.git
synced 2025-10-17 16:44:21 +00:00
feat(cli): add --version option
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user