create-start-app 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/create-app.js +3 -1
- package/package.json +1 -1
- package/src/create-app.ts +5 -1
- package/templates/react/add-on/shadcn/assets/components.json +21 -0
- package/templates/react/add-on/shadcn/assets/src/lib/utils.ts +6 -0
- package/templates/react/add-on/shadcn/assets/src/styles.css +138 -0
- package/templates/react/add-on/shadcn/info.json +1 -5
- package/templates/react/add-on/shadcn/package.json +9 -0
- package/templates/react/add-on/start/assets/src/client.tsx +2 -4
- package/templates/react/add-on/start/assets/src/router.tsx.ejs +5 -2
package/dist/create-app.js
CHANGED
|
@@ -329,7 +329,9 @@ export async function createApp(options, { silent = false, } = {}) {
|
|
|
329
329
|
await templateFile(templateDirBase, './src/App.test.tsx.ejs', options.typescript ? undefined : './src/App.test.jsx');
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
if (routes.length > 0
|
|
332
|
+
if (routes.length > 0 ||
|
|
333
|
+
options.chosenAddOns.length > 0 ||
|
|
334
|
+
integrations.length > 0) {
|
|
333
335
|
await templateFile(templateDirBase, './src/components/Header.tsx.ejs', './src/components/Header.tsx', {
|
|
334
336
|
integrations,
|
|
335
337
|
});
|
package/package.json
CHANGED
package/src/create-app.ts
CHANGED
|
@@ -525,7 +525,11 @@ export async function createApp(
|
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
|
|
528
|
-
if (
|
|
528
|
+
if (
|
|
529
|
+
routes.length > 0 ||
|
|
530
|
+
options.chosenAddOns.length > 0 ||
|
|
531
|
+
integrations.length > 0
|
|
532
|
+
) {
|
|
529
533
|
await templateFile(
|
|
530
534
|
templateDirBase,
|
|
531
535
|
'./src/components/Header.tsx.ejs',
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -3,9 +3,5 @@
|
|
|
3
3
|
"description": "Add Shadcn UI to your application.",
|
|
4
4
|
"phase": "add-on",
|
|
5
5
|
"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/"
|
|
11
7
|
}
|
|
@@ -3,8 +3,6 @@ import { StartClient } from '@tanstack/start'
|
|
|
3
3
|
|
|
4
4
|
import { createRouter } from './router'
|
|
5
5
|
|
|
6
|
-
const router = createRouter(
|
|
7
|
-
scrollRestoration: true,
|
|
8
|
-
})
|
|
6
|
+
const router = createRouter()
|
|
9
7
|
|
|
10
|
-
hydrateRoot(document
|
|
8
|
+
hydrateRoot(document, <StartClient router={router} />)
|
|
@@ -11,7 +11,10 @@ import './styles.css'
|
|
|
11
11
|
|
|
12
12
|
// Create a new router instance
|
|
13
13
|
export const createRouter = () => {
|
|
14
|
-
const router = createTanstackRouter({
|
|
14
|
+
const router = createTanstackRouter({
|
|
15
|
+
routeTree,
|
|
16
|
+
scrollRestoration: true,
|
|
17
|
+
})
|
|
15
18
|
return router
|
|
16
19
|
}
|
|
17
20
|
|
|
@@ -46,6 +49,6 @@ const router = createRouter()
|
|
|
46
49
|
// Register the router instance for type safety
|
|
47
50
|
declare module '@tanstack/react-router' {
|
|
48
51
|
interface Register {
|
|
49
|
-
router: router
|
|
52
|
+
router: typeof router
|
|
50
53
|
}
|
|
51
54
|
}
|