Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/utils/parse-arguments-into-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export async function parseArgumentsIntoOptions(
"--extension": String,
"-e": "--extension",

"--project": String,
"-p": "--project",
"--name": "--project",

"--help": Boolean,
"-h": "--help",
},
Expand All @@ -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"];
Expand Down
3 changes: 2 additions & 1 deletion src/utils/show-help-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> | --solidity-framework <solidity-framework>] [-e <extension> | --extension <extension>] [-h | --help]")}
${chalk.bold.green("npx create-eth<@version>")} ${chalk.gray("[-p <project-name> | --project <project-name>] [--skip | --skip-install] [-s <solidity-framework> | --solidity-framework <solidity-framework>] [-e <extension> | --extension <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
Expand Down