feat: Scaffold plugin in create-medusa-app (#10908)
RESOLVES FRMW-2862 **What** This PR enable the `create-medusa-app` CLI to accept a new `--plugin` option to scaffold a plugin. This is complementary to all the plugin commands being created/adjusted separately to that pr. Also, this pr brings a little refactoring around resource scaffolding, the idea was to contain the refactoring to a little area and not expend it to the entire create-medusa-app package to not disrupt and expand the scope for which the purpose was to introduce the plugin scaffolding capabilities **Addition** - medusa project will get their package.json name changed to the project name - Remove build step from medusa project creation **Plugin flow** - in the plugin - `npx create-medsa-app --plugin` - `yarn dev` - in the project - `yalc add plugin-name` - `yarn dev` Any changes on the plugin will publish, push in the local registry which will fire the hot reload of the app and include the new changes from the plugin
This commit is contained in:
@@ -3,8 +3,9 @@ import { program } from "commander"
|
||||
import create from "./commands/create.js"
|
||||
|
||||
program
|
||||
.description("Create a new Medusa project")
|
||||
.description("Create a new Medusa project or plugin")
|
||||
.argument("[project-name]", "Name of the project to create.")
|
||||
.option("--plugin", "Create a plugin instead of a project.")
|
||||
.option("--repo-url <url>", "URL of repository to use to setup project.")
|
||||
.option("--seed", "Seed the created database with demo data.")
|
||||
.option(
|
||||
|
||||
Reference in New Issue
Block a user