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

This commit is contained in:
Oliver Windall Juhl authored and GitHub committed 2023-03-13 18:59:52 +01:00
1 parent 2f42ed35d6
commit 88392e0176
2 files changed
+7 -22

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
---
"create-medusa-app": patch
---
chore(create-medusa-app): Remove admin + Gatsby starter from npx
+2 -22
View File
@@ -1,6 +1,5 @@
import path from "path"
import Commander from "commander" import Commander from "commander"
import chalk from "chalk" import path from "path"
import { prompt } from "enquirer" import { prompt } from "enquirer"
import { newStarter } from "./new-starter" import { newStarter } from "./new-starter"
@@ -33,11 +32,8 @@ const questions = {
name: "storefront", name: "storefront",
message: "Which storefront starter would you like to install?", message: "Which storefront starter would you like to install?",
choices: [ choices: [
"Gatsby Starter",
"Next.js Starter", "Next.js Starter",
"medusa.express (Next.js)", "medusa.express (Next.js)",
"medusa.express (Gatsby)",
"Gatsby Starter (Simple)",
"None", "None",
], ],
}, },
@@ -61,16 +57,10 @@ const program = new Commander.Command(pkg.name)
const getStorefrontStarter = (starter: string): string => { const getStorefrontStarter = (starter: string): string => {
const selected = starter.toLowerCase() const selected = starter.toLowerCase()
switch (selected) { switch (selected) {
case "gatsby starter":
return "https://github.com/medusajs/gatsby-starter-medusa"
case "next.js starter": case "next.js starter":
return "https://github.com/medusajs/nextjs-starter-medusa" return "https://github.com/medusajs/nextjs-starter-medusa"
case "medusa.express (next.js)": case "medusa.express (next.js)":
return "https://github.com/medusajs/medusa-express-nextjs" return "https://github.com/medusajs/medusa-express-nextjs"
case "medusa.express (gatsby)":
return "https://github.com/medusajs/medusa-express-gatsby"
case "gatsby starter (simple)":
return "https://github.com/medusajs/gatsby-starter-medusa-simple"
default: default:
return "" return ""
} }
@@ -126,12 +116,6 @@ export const run = async (): Promise<void> => {
verbose: progOptions.verbose, verbose: progOptions.verbose,
}) })
} }
await newStarter({
starter: "https://github.com/medusajs/admin",
root: path.join(projectRoot, `admin`),
keepGit: true,
verbose: progOptions.verbose,
})
console.log(` console.log(`
Your project is ready 🚀. The available commands are: Your project is ready 🚀. The available commands are:
@@ -139,17 +123,13 @@ export const run = async (): Promise<void> => {
Medusa API Medusa API
cd ${projectRoot}/backend cd ${projectRoot}/backend
yarn start yarn start
Admin
cd ${projectRoot}/admin
yarn start
`) `)
if (hasStorefront) { if (hasStorefront) {
console.log(` console.log(`
Storefront Storefront
cd ${projectRoot}/storefront cd ${projectRoot}/storefront
yarn start yarn dev
`) `)
} }
} }