diff --git a/src/utils/parse-arguments-into-options.ts b/src/utils/parse-arguments-into-options.ts index a7abc6971f..212cbcd1ea 100644 --- a/src/utils/parse-arguments-into-options.ts +++ b/src/utils/parse-arguments-into-options.ts @@ -25,6 +25,10 @@ export async function parseArgumentsIntoOptions( "--extension": String, "-e": "--extension", + "--project": String, + "-p": "--project", + "--name": "--project", + "--help": Boolean, "-h": "--help", }, @@ -39,7 +43,7 @@ export async function parseArgumentsIntoOptions( const help = args["--help"] ?? false; - let project: string | null = args._[0] ?? null; + let project: string | null = args["--project"] ?? args._[0] ?? null; // use the original extension arg const extensionName = args["--extension"]; diff --git a/src/utils/show-help-message.ts b/src/utils/show-help-message.ts index 441fabce13..e5864a9128 100644 --- a/src/utils/show-help-message.ts +++ b/src/utils/show-help-message.ts @@ -2,9 +2,10 @@ import chalk from "chalk"; export const showHelpMessage = () => { console.log(` ${chalk.bold.blue("Usage:")} - ${chalk.bold.green("npx create-eth<@version>")} ${chalk.gray("[--skip | --skip-install] [-s | --solidity-framework ] [-e | --extension ] [-h | --help]")} + ${chalk.bold.green("npx create-eth<@version>")} ${chalk.gray("[-p | --project ] [--skip | --skip-install] [-s | --solidity-framework ] [-e | --extension ] [-h | --help]")} `); console.log(` ${chalk.bold.blue("Options:")} + ${chalk.gray("-p, --project, --name")} Set project name ${chalk.gray("--skip, --skip-install")} Skip packages installation ${chalk.gray("-s, --solidity-framework")} Choose solidity framework ${chalk.gray("-e, --extension")} Add curated or third-party extension