From 1d4c5af8075efa333f87bbfdb58b82d23d9ef18b Mon Sep 17 00:00:00 2001 From: Xc Date: Sat, 12 Apr 2025 14:40:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=B0=8Fbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/index.js | 2 +- src/index.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/index.js b/lib/index.js index 95aa26d..4cc533e 100755 --- a/lib/index.js +++ b/lib/index.js @@ -93,7 +93,7 @@ commander_1.default .description(`create a new project powered by ${config_1.CLI_NAME}`) .action(create_1.create); commander_1.default - .rename('rename') + .command('rename') .option('-on --old-name', 'oldName') .option('-nn --new-name', 'newName') .option('-ot --old-title', 'oldTitle') diff --git a/src/index.ts b/src/index.ts index 088ef39..61cbfff 100644 --- a/src/index.ts +++ b/src/index.ts @@ -82,6 +82,7 @@ program .option('--resetCache', 'react native start --reset-cache') .description('build project of start on demand') .action(build); + program .command('build') .option('--sourcemap', 'sourcemap') @@ -94,6 +95,7 @@ program .option('-p, --platform ', 'platform') .description('build project of build on demand') .action(build); + program .command('create ') .usage('') @@ -101,20 +103,23 @@ program .option('-m, --module', 'module') .description(`create a new project powered by ${CLI_NAME}`) .action(create); + program - .rename('rename') + .command('rename') .option('-on --old-name', 'oldName') .option('-nn --new-name', 'newName') .option('-ot --old-title', 'oldTitle') .option('-nt --new-title', 'newTitle') .description('rename an existed project') .action(rename); + program .command('update [subDirName]') .usage('') .option('-d, --dev', 'dev') .description(`update project's template powered by ${CLI_NAME}`) .action(update); + program .command('run') .option('-p, --platform ', 'platform') @@ -123,6 +128,7 @@ program .option('-suffix, --appIdSuffix ', 'appIdSuffix') .description(`run rn by ${CLI_NAME}`) .action(run); + program .command('clean') .option('-p, --platform ', 'platform')