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",
"type": "module",
"version": "0.9.9123456",
"version": "0.9.0",
"description": "Add components to your apps.",
"publishConfig": {
"access": "public"

View File

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