Skip to content

Commit 27922ab

Browse files
committed
fix: shadcn hanging
1 parent 12b3102 commit 27922ab

File tree

6 files changed

+180
-6
lines changed

6 files changed

+180
-6
lines changed

src/create-app.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,11 @@ export async function createApp(
525525
}
526526
}
527527

528-
if (routes.length > 0) {
528+
if (
529+
routes.length > 0 ||
530+
options.chosenAddOns.length > 0 ||
531+
integrations.length > 0
532+
) {
529533
await templateFile(
530534
templateDirBase,
531535
'./src/components/Header.tsx.ejs',
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/styles.css",
9+
"baseColor": "zinc",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib",
18+
"hooks": "@/hooks"
19+
},
20+
"iconLibrary": "lucide"
21+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { clsx, type ClassValue } from "clsx"
2+
import { twMerge } from "tailwind-merge"
3+
4+
export function cn(...inputs: ClassValue[]) {
5+
return twMerge(clsx(inputs))
6+
}
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
@import 'tailwindcss';
2+
3+
@plugin "tailwindcss-animate";
4+
5+
@custom-variant dark (&:is(.dark *));
6+
7+
body {
8+
@apply m-0;
9+
font-family:
10+
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
11+
'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
12+
-webkit-font-smoothing: antialiased;
13+
-moz-osx-font-smoothing: grayscale;
14+
}
15+
16+
code {
17+
font-family:
18+
source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
19+
}
20+
21+
:root {
22+
--background: oklch(1 0 0);
23+
--foreground: oklch(0.141 0.005 285.823);
24+
--card: oklch(1 0 0);
25+
--card-foreground: oklch(0.141 0.005 285.823);
26+
--popover: oklch(1 0 0);
27+
--popover-foreground: oklch(0.141 0.005 285.823);
28+
--primary: oklch(0.21 0.006 285.885);
29+
--primary-foreground: oklch(0.985 0 0);
30+
--secondary: oklch(0.967 0.001 286.375);
31+
--secondary-foreground: oklch(0.21 0.006 285.885);
32+
--muted: oklch(0.967 0.001 286.375);
33+
--muted-foreground: oklch(0.552 0.016 285.938);
34+
--accent: oklch(0.967 0.001 286.375);
35+
--accent-foreground: oklch(0.21 0.006 285.885);
36+
--destructive: oklch(0.577 0.245 27.325);
37+
--destructive-foreground: oklch(0.577 0.245 27.325);
38+
--border: oklch(0.92 0.004 286.32);
39+
--input: oklch(0.92 0.004 286.32);
40+
--ring: oklch(0.871 0.006 286.286);
41+
--chart-1: oklch(0.646 0.222 41.116);
42+
--chart-2: oklch(0.6 0.118 184.704);
43+
--chart-3: oklch(0.398 0.07 227.392);
44+
--chart-4: oklch(0.828 0.189 84.429);
45+
--chart-5: oklch(0.769 0.188 70.08);
46+
--radius: 0.625rem;
47+
--sidebar: oklch(0.985 0 0);
48+
--sidebar-foreground: oklch(0.141 0.005 285.823);
49+
--sidebar-primary: oklch(0.21 0.006 285.885);
50+
--sidebar-primary-foreground: oklch(0.985 0 0);
51+
--sidebar-accent: oklch(0.967 0.001 286.375);
52+
--sidebar-accent-foreground: oklch(0.21 0.006 285.885);
53+
--sidebar-border: oklch(0.92 0.004 286.32);
54+
--sidebar-ring: oklch(0.871 0.006 286.286);
55+
}
56+
57+
.dark {
58+
--background: oklch(0.141 0.005 285.823);
59+
--foreground: oklch(0.985 0 0);
60+
--card: oklch(0.141 0.005 285.823);
61+
--card-foreground: oklch(0.985 0 0);
62+
--popover: oklch(0.141 0.005 285.823);
63+
--popover-foreground: oklch(0.985 0 0);
64+
--primary: oklch(0.985 0 0);
65+
--primary-foreground: oklch(0.21 0.006 285.885);
66+
--secondary: oklch(0.274 0.006 286.033);
67+
--secondary-foreground: oklch(0.985 0 0);
68+
--muted: oklch(0.274 0.006 286.033);
69+
--muted-foreground: oklch(0.705 0.015 286.067);
70+
--accent: oklch(0.274 0.006 286.033);
71+
--accent-foreground: oklch(0.985 0 0);
72+
--destructive: oklch(0.396 0.141 25.723);
73+
--destructive-foreground: oklch(0.637 0.237 25.331);
74+
--border: oklch(0.274 0.006 286.033);
75+
--input: oklch(0.274 0.006 286.033);
76+
--ring: oklch(0.442 0.017 285.786);
77+
--chart-1: oklch(0.488 0.243 264.376);
78+
--chart-2: oklch(0.696 0.17 162.48);
79+
--chart-3: oklch(0.769 0.188 70.08);
80+
--chart-4: oklch(0.627 0.265 303.9);
81+
--chart-5: oklch(0.645 0.246 16.439);
82+
--sidebar: oklch(0.21 0.006 285.885);
83+
--sidebar-foreground: oklch(0.985 0 0);
84+
--sidebar-primary: oklch(0.488 0.243 264.376);
85+
--sidebar-primary-foreground: oklch(0.985 0 0);
86+
--sidebar-accent: oklch(0.274 0.006 286.033);
87+
--sidebar-accent-foreground: oklch(0.985 0 0);
88+
--sidebar-border: oklch(0.274 0.006 286.033);
89+
--sidebar-ring: oklch(0.442 0.017 285.786);
90+
}
91+
92+
@theme inline {
93+
--color-background: var(--background);
94+
--color-foreground: var(--foreground);
95+
--color-card: var(--card);
96+
--color-card-foreground: var(--card-foreground);
97+
--color-popover: var(--popover);
98+
--color-popover-foreground: var(--popover-foreground);
99+
--color-primary: var(--primary);
100+
--color-primary-foreground: var(--primary-foreground);
101+
--color-secondary: var(--secondary);
102+
--color-secondary-foreground: var(--secondary-foreground);
103+
--color-muted: var(--muted);
104+
--color-muted-foreground: var(--muted-foreground);
105+
--color-accent: var(--accent);
106+
--color-accent-foreground: var(--accent-foreground);
107+
--color-destructive: var(--destructive);
108+
--color-destructive-foreground: var(--destructive-foreground);
109+
--color-border: var(--border);
110+
--color-input: var(--input);
111+
--color-ring: var(--ring);
112+
--color-chart-1: var(--chart-1);
113+
--color-chart-2: var(--chart-2);
114+
--color-chart-3: var(--chart-3);
115+
--color-chart-4: var(--chart-4);
116+
--color-chart-5: var(--chart-5);
117+
--radius-sm: calc(var(--radius) - 4px);
118+
--radius-md: calc(var(--radius) - 2px);
119+
--radius-lg: var(--radius);
120+
--radius-xl: calc(var(--radius) + 4px);
121+
--color-sidebar: var(--sidebar);
122+
--color-sidebar-foreground: var(--sidebar-foreground);
123+
--color-sidebar-primary: var(--sidebar-primary);
124+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
125+
--color-sidebar-accent: var(--sidebar-accent);
126+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
127+
--color-sidebar-border: var(--sidebar-border);
128+
--color-sidebar-ring: var(--sidebar-ring);
129+
}
130+
131+
@layer base {
132+
* {
133+
@apply border-border outline-ring/50;
134+
}
135+
body {
136+
@apply bg-background text-foreground;
137+
}
138+
}

templates/react/add-on/shadcn/info.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,5 @@
33
"description": "Add Shadcn UI to your application.",
44
"phase": "add-on",
55
"templates": ["file-router", "code-router"],
6-
"link": "https://ui.shadcn.com/",
7-
"command": {
8-
"command": "npx",
9-
"args": ["shadcn@canary", "init", "-d", "-s"]
10-
}
6+
"link": "https://ui.shadcn.com/"
117
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"dependencies": {
3+
"class-variance-authority": "^0.7.1",
4+
"clsx": "^2.1.1",
5+
"lucide-react": "^0.476.0",
6+
"tailwind-merge": "^3.0.2",
7+
"tailwindcss-animate": "^1.0.7"
8+
}
9+
}

0 commit comments

Comments
 (0)