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