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:
@@ -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