修正小bug

This commit is contained in:
Xu Chang 2025-04-12 14:40:34 +08:00
parent 324dfddb27
commit 1d4c5af807
2 changed files with 8 additions and 2 deletions

View File

@ -93,7 +93,7 @@ commander_1.default
.description(`create a new project powered by ${config_1.CLI_NAME}`) .description(`create a new project powered by ${config_1.CLI_NAME}`)
.action(create_1.create); .action(create_1.create);
commander_1.default commander_1.default
.rename('rename') .command('rename')
.option('-on --old-name', 'oldName') .option('-on --old-name', 'oldName')
.option('-nn --new-name', 'newName') .option('-nn --new-name', 'newName')
.option('-ot --old-title', 'oldTitle') .option('-ot --old-title', 'oldTitle')

View File

@ -82,6 +82,7 @@ program
.option('--resetCache', 'react native start --reset-cache') .option('--resetCache', 'react native start --reset-cache')
.description('build project of start on demand') .description('build project of start on demand')
.action(build); .action(build);
program program
.command('build') .command('build')
.option('--sourcemap', 'sourcemap') .option('--sourcemap', 'sourcemap')
@ -94,6 +95,7 @@ program
.option('-p, --platform <platform>', 'platform') .option('-p, --platform <platform>', 'platform')
.description('build project of build on demand') .description('build project of build on demand')
.action(build); .action(build);
program program
.command('create <name>') .command('create <name>')
.usage('<name>') .usage('<name>')
@ -101,20 +103,23 @@ program
.option('-m, --module', 'module') .option('-m, --module', 'module')
.description(`create a new project powered by ${CLI_NAME}`) .description(`create a new project powered by ${CLI_NAME}`)
.action(create); .action(create);
program program
.rename('rename') .command('rename')
.option('-on --old-name', 'oldName') .option('-on --old-name', 'oldName')
.option('-nn --new-name', 'newName') .option('-nn --new-name', 'newName')
.option('-ot --old-title', 'oldTitle') .option('-ot --old-title', 'oldTitle')
.option('-nt --new-title', 'newTitle') .option('-nt --new-title', 'newTitle')
.description('rename an existed project') .description('rename an existed project')
.action(rename); .action(rename);
program program
.command('update <name> [subDirName]') .command('update <name> [subDirName]')
.usage('<name>') .usage('<name>')
.option('-d, --dev', 'dev') .option('-d, --dev', 'dev')
.description(`update project's template powered by ${CLI_NAME}`) .description(`update project's template powered by ${CLI_NAME}`)
.action(update); .action(update);
program program
.command('run') .command('run')
.option('-p, --platform <platform>', 'platform') .option('-p, --platform <platform>', 'platform')
@ -123,6 +128,7 @@ program
.option('-suffix, --appIdSuffix <appIdSuffix>', 'appIdSuffix') .option('-suffix, --appIdSuffix <appIdSuffix>', 'appIdSuffix')
.description(`run rn by ${CLI_NAME}`) .description(`run rn by ${CLI_NAME}`)
.action(run); .action(run);
program program
.command('clean') .command('clean')
.option('-p, --platform <platform>', 'platform') .option('-p, --platform <platform>', 'platform')