feat(create-medusa-app,medusa-cli): Allow clearing project (#4273)
- Added build step - Added `--no-boilerplate` option to `create-medusa-app` to allow clearing onboarding files - Clear project files by default in medusa-cli
This commit is contained in:
1 parent
f8643361cd
commit
f98ba5bde8
18 files changed
+582
-87
No files matched your search
@@ -45,6 +45,7 @@
|
||||
"execa": "^5.1.1",
|
||||
"fs-exists-cached": "^1.0.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"glob": "^10.2.7",
|
||||
"hosted-git-info": "^4.0.2",
|
||||
"inquirer": "^8.0.0",
|
||||
"is-valid-path": "^0.1.1",
|
||||
|
||||
@@ -15,9 +15,11 @@ import url from "url"
|
||||
import { createDatabase } from "pg-god"
|
||||
import { track } from "medusa-telemetry"
|
||||
import inquirer from "inquirer"
|
||||
import { globSync } from "glob"
|
||||
|
||||
import reporter from "../reporter"
|
||||
import { getPackageManager, setPackageManager } from "../util/package-manager"
|
||||
import { clearProject } from "@medusajs/utils"
|
||||
|
||||
const removeUndefined = (obj) => {
|
||||
return Object.fromEntries(
|
||||
@@ -632,6 +634,12 @@ medusa new ${rootPath} [url-to-starter]
|
||||
}
|
||||
}
|
||||
|
||||
if (!selectedOtherStarter) {
|
||||
reporter.info("Final project preparations...")
|
||||
// remove demo files
|
||||
clearProject(rootPath)
|
||||
}
|
||||
|
||||
successMessage(rootPath)
|
||||
track("CLI_NEW_SUCCEEDED")
|
||||
}
|
||||
Reference in new issue
Block a user