feat(create-medusa-app): add install Next.js storefront option (#4968)
* feat(create-medusa-app): add install Next.js storefront option * added config for yes option * added more instructions to exit message * handle duplicate directories and next errors * use next.js branch * add line break in storefront question * pass next.js directory name as env variable * change question message * address PR feedback * fix(medusa-cli): remove .git directory in `new` command * fix deleting a directory error
This commit is contained in:
@@ -20,6 +20,7 @@ import reporter from "../reporter"
|
||||
import { getPackageManager, setPackageManager } from "../util/package-manager"
|
||||
import { PanicId } from "../reporter/panic-handler"
|
||||
import { clearProject } from "../util/clear-project"
|
||||
import path from "path"
|
||||
|
||||
const removeUndefined = (obj) => {
|
||||
return Object.fromEntries(
|
||||
@@ -641,6 +642,11 @@ medusa new ${rootPath} [url-to-starter]
|
||||
reporter.info("Final project preparations...")
|
||||
// remove demo files
|
||||
clearProject(rootPath)
|
||||
// remove .git directory
|
||||
fs.rmSync(path.join(rootPath, '.git'), {
|
||||
recursive: true,
|
||||
force: true,
|
||||
})
|
||||
}
|
||||
|
||||
successMessage(rootPath)
|
||||
|
||||
Reference in New Issue
Block a user