-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-shadcn.ps1
More file actions
66 lines (63 loc) · 1.49 KB
/
install-shadcn.ps1
File metadata and controls
66 lines (63 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Install all available shadcn/ui components
Write-Host "Installing shadcn/ui components..." -ForegroundColor Green
# Core components (most are already installed, but this ensures they're up to date)
$components = @(
"accordion",
"alert",
"alert-dialog",
"aspect-ratio",
"avatar",
"badge",
"breadcrumb",
"button",
"calendar",
"card",
"carousel",
"chart",
"checkbox",
"collapsible",
"command",
"context-menu",
"dialog",
"drawer",
"dropdown-menu",
"form",
"hover-card",
"input",
"input-otp",
"label",
"menubar",
"navigation-menu",
"pagination",
"popover",
"progress",
"radio-group",
"resizable",
"scroll-area",
"select",
"separator",
"sheet",
"sidebar",
"skeleton",
"slider",
"sonner",
"switch",
"table",
"tabs",
"textarea",
"toast",
"toggle",
"toggle-group",
"tooltip"
)
foreach ($component in $components) {
Write-Host "Checking $component..." -ForegroundColor Cyan
pnpm dlx shadcn@latest add $component --yes --overwrite 2>&1 | Out-Null
if ($LASTEXITCODE -eq 0) {
Write-Host "✓ $component installed/updated" -ForegroundColor Green
} else {
Write-Host "✗ $component failed or already exists" -ForegroundColor Yellow
}
}
Write-Host "`nAll components processed!" -ForegroundColor Green
Write-Host "Note: Some components may have failed if they don't exist in the registry." -ForegroundColor Yellow