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')