fix: shadcn-vue init not installing all dependencies or devDependencies

This commit is contained in:
Sadegh Barati 2024-04-06 00:57:56 +03:30
parent 75d10d5b8e
commit e8ff23e785

View File

@ -292,19 +292,13 @@ export async function runInit(cwd: string, config: Config) {
config.style === 'new-york' ? ['@radix-icons/vue'] : ['lucide-vue-next'], config.style === 'new-york' ? ['@radix-icons/vue'] : ['lucide-vue-next'],
).filter(Boolean) ).filter(Boolean)
async function addNuxtDevDeps() {
if (config.framework === 'nuxt') {
await addDevDependency(PROJECT_DEPENDENCIES.nuxt, {
cwd,
silent: true,
})
}
}
await Promise.allSettled( await Promise.allSettled(
[ [
addNuxtDevDeps(), config.framework === 'nuxt' && await addDevDependency(PROJECT_DEPENDENCIES.nuxt, {
addDependency(deps, { cwd,
silent: true,
}),
await addDependency(deps, {
cwd, cwd,
silent: true, silent: true,
}), }),