mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-28 15:14:12 +00:00
fix
This commit is contained in:
@@ -305,6 +305,21 @@ export const init = new Command()
|
||||
}
|
||||
}
|
||||
|
||||
// Prompt for monorepo if the template supports it.
|
||||
if (
|
||||
options.monorepo === undefined &&
|
||||
options.template &&
|
||||
templates[options.template as keyof typeof templates]?.monorepo
|
||||
) {
|
||||
const { monorepo } = await prompts({
|
||||
type: "confirm",
|
||||
name: "monorepo",
|
||||
message: "Would you like to set up a monorepo?",
|
||||
initial: false,
|
||||
})
|
||||
options.monorepo = monorepo
|
||||
}
|
||||
|
||||
// Prompt for base if not provided.
|
||||
if (!options.base) {
|
||||
options.base = await promptForBase()
|
||||
@@ -376,21 +391,6 @@ export const init = new Command()
|
||||
}
|
||||
}
|
||||
|
||||
// Prompt for monorepo if the template supports it.
|
||||
if (
|
||||
options.monorepo === undefined &&
|
||||
options.template &&
|
||||
templates[options.template as keyof typeof templates]?.monorepo
|
||||
) {
|
||||
const { monorepo } = await prompts({
|
||||
type: "confirm",
|
||||
name: "monorepo",
|
||||
message: "Would you like to set up a monorepo?",
|
||||
initial: false,
|
||||
})
|
||||
options.monorepo = monorepo
|
||||
}
|
||||
|
||||
// Resolve base: --base flag > preset/prompt/URL > existing config > prompt.
|
||||
let resolvedBase: string =
|
||||
options.base ??
|
||||
|
||||
Reference in New Issue
Block a user