fix: flip seed flag to default to true (#398)
This commit is contained in:
@@ -28,11 +28,6 @@ const questions = {
|
|||||||
name: "starterUrl",
|
name: "starterUrl",
|
||||||
message: "Where is the starter located? (URL or path)",
|
message: "Where is the starter located? (URL or path)",
|
||||||
},
|
},
|
||||||
seed: {
|
|
||||||
type: "confirm",
|
|
||||||
name: "seed",
|
|
||||||
message: "Should we attempt to seed your database?",
|
|
||||||
},
|
|
||||||
storefront: {
|
storefront: {
|
||||||
type: "select",
|
type: "select",
|
||||||
name: "storefront",
|
name: "storefront",
|
||||||
@@ -50,8 +45,8 @@ const program = new Commander.Command(pkg.name)
|
|||||||
`A GitHub URL to a repository that contains a Medusa starter project to bootstrap from`
|
`A GitHub URL to a repository that contains a Medusa starter project to bootstrap from`
|
||||||
)
|
)
|
||||||
.option(
|
.option(
|
||||||
`--seed`,
|
`--no-seed`,
|
||||||
`If run with the seed flag the script will automatically attempt to seed the database upon setup`
|
`If run with the no-seed flag the script will skip seeding the database upon setup`
|
||||||
)
|
)
|
||||||
.option(`-v --verbose`, `Show all installation output`)
|
.option(`-v --verbose`, `Show all installation output`)
|
||||||
.parse(process.argv)
|
.parse(process.argv)
|
||||||
@@ -82,8 +77,8 @@ export const run = async (): Promise<void> => {
|
|||||||
|
|
||||||
const progOptions = program.opts()
|
const progOptions = program.opts()
|
||||||
|
|
||||||
const seed = progOptions.seed
|
const noSeed = progOptions.noSeed
|
||||||
track("SEED_SELECTED", { seed })
|
track("SEED_SELECTED", { seed: !noSeed })
|
||||||
|
|
||||||
const { storefront } = (await prompt(questions.storefront)) as {
|
const { storefront } = (await prompt(questions.storefront)) as {
|
||||||
storefront: string
|
storefront: string
|
||||||
@@ -93,7 +88,7 @@ export const run = async (): Promise<void> => {
|
|||||||
await newStarter({
|
await newStarter({
|
||||||
starter,
|
starter,
|
||||||
root: path.join(projectRoot, `backend`),
|
root: path.join(projectRoot, `backend`),
|
||||||
seed,
|
seed: !noSeed,
|
||||||
verbose: progOptions.verbose,
|
verbose: progOptions.verbose,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user