mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-11 09:51:40 +00:00
fix
This commit is contained in:
@@ -20,6 +20,8 @@ export function createTemplate(config: {
|
||||
name: string
|
||||
title: string
|
||||
defaultProjectName: string
|
||||
// Force a specific package manager for this template.
|
||||
packageManager?: string
|
||||
// Framework names that map to this template.
|
||||
frameworks?: string[]
|
||||
scaffold: (options: TemplateOptions) => Promise<void>
|
||||
|
||||
@@ -23,6 +23,7 @@ export const nextMonorepo = createTemplate({
|
||||
name: "next-monorepo",
|
||||
title: "Next.js (Monorepo)",
|
||||
defaultProjectName: "next-monorepo",
|
||||
packageManager: "pnpm",
|
||||
scaffold: async ({ projectPath, packageManager }) => {
|
||||
const createSpinner = spinner(
|
||||
`Creating a new Next.js monorepo. This may take a few minutes.`
|
||||
|
||||
@@ -61,9 +61,11 @@ export async function createProject(
|
||||
projectName = name ?? projectName
|
||||
}
|
||||
|
||||
const packageManager = await getPackageManager(options.cwd, {
|
||||
withFallback: true,
|
||||
})
|
||||
const packageManager =
|
||||
templates[template].packageManager ??
|
||||
(await getPackageManager(options.cwd, {
|
||||
withFallback: true,
|
||||
}))
|
||||
|
||||
const projectPath = `${options.cwd}/${projectName}`
|
||||
|
||||
|
||||
@@ -7,5 +7,5 @@
|
||||
"printWidth": 80,
|
||||
"plugins": ["prettier-plugin-tailwindcss"],
|
||||
"tailwindStylesheet": "app/globals.css",
|
||||
"tailwindFunctions": ["cn"]
|
||||
"tailwindFunctions": ["cn", "cva"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user