chore: add components promise

This commit is contained in:
Sadegh Barati 2024-02-05 20:32:22 +03:30
parent e06cad7f83
commit c8fda1db6d
2 changed files with 9 additions and 16 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "shadcn-vue", "name": "shadcn-vue",
"type": "module", "type": "module",
"version": "0.9.9123456", "version": "0.9.0",
"description": "Add components to your apps.", "description": "Add components to your apps.",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"

View File

@ -200,23 +200,16 @@ export const add = new Command()
} }
// Install dependencies. // Install dependencies.
await Promise.allSettled( await Promise.allSettled(
[ [
() => { item.dependencies?.length && await addDependency(item.dependencies, {
if (item.dependencies?.length) {
return addDependency(item.dependencies, {
cwd, cwd,
}) silent: true,
} }),
}, item.devDependencies?.length && await addDevDependency(item.devDependencies, {
() => {
if (item.devDependencies?.length) {
return addDevDependency(item.devDependencies, {
cwd, cwd,
}) silent: true,
} }),
},
], ],
) )
} }