mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-11-04 12:52:08 +08:00 
			
		
		
		
	feat(@vant/cli): support specify tag
This commit is contained in:
		
							parent
							
								
									7ea5c6d8df
								
							
						
					
					
						commit
						d84d2d6834
					
				@ -4,11 +4,14 @@ import { join } from 'path';
 | 
			
		||||
 | 
			
		||||
const PLUGIN_PATH = join(__dirname, '../compiler/vant-cli-release-plugin.js');
 | 
			
		||||
 | 
			
		||||
export async function release() {
 | 
			
		||||
export async function release(command: { tag?: string }) {
 | 
			
		||||
  await releaseIt({
 | 
			
		||||
    plugins: {
 | 
			
		||||
      [PLUGIN_PATH]: {},
 | 
			
		||||
    },
 | 
			
		||||
    npm: {
 | 
			
		||||
      tag: command.tag,
 | 
			
		||||
    },
 | 
			
		||||
    git: {
 | 
			
		||||
      tagName: 'v${version}',
 | 
			
		||||
      commitMessage: 'chore: release ${version}',
 | 
			
		||||
 | 
			
		||||
@ -19,13 +19,9 @@ version(`@vant/cli ${packageJson.version}`);
 | 
			
		||||
 | 
			
		||||
process.env.VANT_CLI_VERSION = packageJson.version;
 | 
			
		||||
 | 
			
		||||
command('dev')
 | 
			
		||||
  .description('Run webpack dev server')
 | 
			
		||||
  .action(dev);
 | 
			
		||||
command('dev').description('Run webpack dev server').action(dev);
 | 
			
		||||
 | 
			
		||||
command('lint')
 | 
			
		||||
  .description('Run eslint and stylelint')
 | 
			
		||||
  .action(lint);
 | 
			
		||||
command('lint').description('Run eslint and stylelint').action(lint);
 | 
			
		||||
 | 
			
		||||
command('test')
 | 
			
		||||
  .description('Run unit tests through jest')
 | 
			
		||||
@ -49,15 +45,10 @@ command('test')
 | 
			
		||||
    '--runInBand',
 | 
			
		||||
    'Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests'
 | 
			
		||||
  )
 | 
			
		||||
  .option(
 | 
			
		||||
    '--debug',
 | 
			
		||||
    'Print debugging info about your Jest config'
 | 
			
		||||
  )
 | 
			
		||||
  .option('--debug', 'Print debugging info about your Jest config')
 | 
			
		||||
  .action(test);
 | 
			
		||||
 | 
			
		||||
command('clean')
 | 
			
		||||
  .description('Clean all dist files')
 | 
			
		||||
  .action(clean);
 | 
			
		||||
command('clean').description('Clean all dist files').action(clean);
 | 
			
		||||
 | 
			
		||||
command('build')
 | 
			
		||||
  .description('Compile components in production mode')
 | 
			
		||||
@ -66,18 +57,15 @@ command('build')
 | 
			
		||||
 | 
			
		||||
command('release')
 | 
			
		||||
  .description('Compile components and release it')
 | 
			
		||||
  .option('--tag <tag>', 'Release tag')
 | 
			
		||||
  .action(release);
 | 
			
		||||
 | 
			
		||||
command('build-site')
 | 
			
		||||
  .description('Compile site in production mode')
 | 
			
		||||
  .action(buildSite);
 | 
			
		||||
 | 
			
		||||
command('changelog')
 | 
			
		||||
  .description('Generate changelog')
 | 
			
		||||
  .action(changelog);
 | 
			
		||||
command('changelog').description('Generate changelog').action(changelog);
 | 
			
		||||
 | 
			
		||||
command('commit-lint')
 | 
			
		||||
  .description('Lint commit message')
 | 
			
		||||
  .action(commitLint);
 | 
			
		||||
command('commit-lint').description('Lint commit message').action(commitLint);
 | 
			
		||||
 | 
			
		||||
parse();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user