Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(create-medusa-app): Remove Admin + Gatsby starter from npx #3376

Merged
merged 4 commits into from
Mar 13, 2023
Merged
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
5 changes: 5 additions & 0 deletions .changeset/cuddly-keys-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-medusa-app": patch
---

chore(create-medusa-app): Remove admin + Gatsby starter from npx
24 changes: 2 additions & 22 deletions packages/create-medusa-app/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import path from "path"
import Commander from "commander"
import chalk from "chalk"
import path from "path"

import { prompt } from "enquirer"
import { newStarter } from "./new-starter"
Expand Down Expand Up @@ -33,11 +32,8 @@ const questions = {
name: "storefront",
message: "Which storefront starter would you like to install?",
choices: [
"Gatsby Starter",
"Next.js Starter",
"medusa.express (Next.js)",
"medusa.express (Gatsby)",
"Gatsby Starter (Simple)",
"None",
],
},
Expand All @@ -61,16 +57,10 @@ const program = new Commander.Command(pkg.name)
const getStorefrontStarter = (starter: string): string => {
const selected = starter.toLowerCase()
switch (selected) {
case "gatsby starter":
return "https:/medusajs/gatsby-starter-medusa"
case "next.js starter":
return "https:/medusajs/nextjs-starter-medusa"
case "medusa.express (next.js)":
return "https:/medusajs/medusa-express-nextjs"
case "medusa.express (gatsby)":
return "https:/medusajs/medusa-express-gatsby"
case "gatsby starter (simple)":
return "https:/medusajs/gatsby-starter-medusa-simple"
default:
return ""
}
Expand Down Expand Up @@ -126,30 +116,20 @@ export const run = async (): Promise<void> => {
verbose: progOptions.verbose,
})
}
await newStarter({
starter: "https:/medusajs/admin",
root: path.join(projectRoot, `admin`),
keepGit: true,
verbose: progOptions.verbose,
})

console.log(`
Your project is ready 🚀. The available commands are:

Medusa API
cd ${projectRoot}/backend
yarn start

Admin
cd ${projectRoot}/admin
yarn start
`)

if (hasStorefront) {
olivermrbl marked this conversation as resolved.
Show resolved Hide resolved
console.log(`
Storefront
cd ${projectRoot}/storefront
yarn start
yarn dev
`)
}
}