diff --git a/packages/vant-cli/src/index.ts b/packages/vant-cli/src/index.ts index 294ed4f7c..cf3dd4f7c 100755 --- a/packages/vant-cli/src/index.ts +++ b/packages/vant-cli/src/index.ts @@ -11,27 +11,49 @@ import { changelog } from './commands/changelog'; import { buildSite } from './commands/build-site'; import { commitLint } from './commands/commit-lint'; -command('dev').action(dev); +command('dev') + .description('Run webpack dev server') + .action(dev); -command('lint').action(lint); +command('lint') + .description('Run eslint and stylelint') + .action(lint); -command('clean').action(clean); +command('test') + .description('Run unit tests through jest') + .option( + '--watch', + 'Watch files for changes and rerun tests related to changed files' + ) + .option( + '--clearCache', + 'Clears the configured Jest cache directory and then exits' + ) + .action(test); + +command('clean') + .description('Clean all dist files') + .action(clean); command('build') + .description('Compile components in production mode') .option('--watch', 'Watch file change') .action(build); -command('release').action(release); +command('release') + .description('Compile components and release it') + .action(release); -command('changelog').action(changelog); +command('build-site') + .description('Compile site in production mode') + .action(buildSite); -command('build-site').action(buildSite); +command('changelog') + .description('Generate changelog') + .action(changelog); -command('commit-lint').action(commitLint); - -command('test') - .option('--watch') - .option('--clearCache') - .action(test); +command('commit-lint') + .description('Lint commit message') + .action(commitLint); parse(process.argv);