feat(create-medusa-app): allow passing project name on command line (#10755)

Allow passing the project name on the command line:

```bash
npx create-medusa-app@latest my-project
```
This commit is contained in:
Shahed Nasser
2024-12-29 09:41:15 +00:00
committed by GitHub
parent 1c355dac36
commit 1e6d56bc18
4 changed files with 38 additions and 16 deletions
@@ -4,7 +4,7 @@ import { logger } from "./logger.js"
type LogOptions = {
message: string
type?: "error" | "success" | "info" | "warning" | "verbose"
type?: "error" | "success" | "info" | "warn" | "verbose"
}
export default ({ message, type = "info" }: LogOptions) => {
@@ -15,8 +15,8 @@ export default ({ message, type = "info" }: LogOptions) => {
case "success":
logger.info(chalk.green(message))
break
case "warning":
logger.warning(chalk.yellow(message))
case "warn":
logger.warn(chalk.yellow(message))
break
case "verbose":
logger.info(`${chalk.bgYellowBright("VERBOSE LOG:")} ${message}`)