sprawlify 0.0.104 → 0.0.105
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/index.mjs +77 -46
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { existsSync } from "fs";
|
|
|
8
8
|
import prompts from "prompts";
|
|
9
9
|
import { faker } from "@faker-js/faker";
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "0.0.
|
|
11
|
+
var version = "0.0.105";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/utils/file-helper.ts
|
|
14
14
|
const FILE_BACKUP_SUFFIX = ".bak";
|
|
@@ -244,7 +244,7 @@ const PRESETS = {
|
|
|
244
244
|
"tailwind-merge": "^3.5.0"
|
|
245
245
|
},
|
|
246
246
|
devDependencies: {
|
|
247
|
-
"tailwind-scrollbar": "^4.0.
|
|
247
|
+
"tailwind-scrollbar": "^4.0.2",
|
|
248
248
|
"tw-animate-css": "^1.4.0"
|
|
249
249
|
},
|
|
250
250
|
tailwindcss: { css: "@import \"tailwindcss\";\n@import \"tw-animate-css\";\n@plugin 'tailwind-scrollbar';\n\n@custom-variant dark (&:is(.dark *));\n\n:root {\n --background: oklch(1 0 0);\n --foreground: oklch(0.145 0 0);\n --card: oklch(1 0 0);\n --card-foreground: oklch(0.145 0 0);\n --popover: oklch(1 0 0);\n --popover-foreground: oklch(0.145 0 0);\n --primary: oklch(0.205 0 0);\n --primary-foreground: oklch(0.985 0 0);\n --secondary: oklch(0.97 0 0);\n --secondary-foreground: oklch(0.205 0 0);\n --muted: oklch(0.97 0 0);\n --muted-foreground: oklch(0.556 0 0);\n --accent: oklch(0.97 0 0);\n --accent-foreground: oklch(0.205 0 0);\n --destructive: oklch(0.577 0.245 27.325);\n --destructive-foreground: oklch(0.577 0.245 27.325);\n --border: oklch(0.922 0 0);\n --input: oklch(0.922 0 0);\n --ring: oklch(0.708 0 0);\n --radius: 0.625rem;\n --sidebar: oklch(0.985 0 0);\n --sidebar-foreground: oklch(0.145 0 0);\n --sidebar-primary: oklch(0.205 0 0);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.97 0 0);\n --sidebar-accent-foreground: oklch(0.205 0 0);\n --sidebar-border: oklch(0.922 0 0);\n --sidebar-ring: oklch(0.708 0 0);\n}\n\n.dark {\n --background: oklch(0.145 0 0);\n --foreground: oklch(0.985 0 0);\n --card: oklch(0.145 0 0);\n --card-foreground: oklch(0.985 0 0);\n --popover: oklch(0.145 0 0);\n --popover-foreground: oklch(0.985 0 0);\n --primary: oklch(0.985 0 0);\n --primary-foreground: oklch(0.205 0 0);\n --secondary: oklch(0.269 0 0);\n --secondary-foreground: oklch(0.985 0 0);\n --muted: oklch(0.269 0 0);\n --muted-foreground: oklch(0.708 0 0);\n --accent: oklch(0.269 0 0);\n --accent-foreground: oklch(0.985 0 0);\n --destructive: oklch(0.396 0.141 25.723);\n --destructive-foreground: oklch(0.637 0.237 25.331);\n --border: oklch(0.269 0 0);\n --input: oklch(0.269 0 0);\n --ring: oklch(0.439 0 0);\n --sidebar: oklch(0.205 0 0);\n --sidebar-foreground: oklch(0.985 0 0);\n --sidebar-primary: oklch(0.488 0.243 264.376);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.269 0 0);\n --sidebar-accent-foreground: oklch(0.985 0 0);\n --sidebar-border: oklch(0.269 0 0);\n --sidebar-ring: oklch(0.439 0 0);\n}\n\n@theme inline {\n --color-background: var(--background);\n --color-foreground: var(--foreground);\n --color-card: var(--card);\n --color-card-foreground: var(--card-foreground);\n --color-popover: var(--popover);\n --color-popover-foreground: var(--popover-foreground);\n --color-primary: var(--primary);\n --color-primary-foreground: var(--primary-foreground);\n --color-secondary: var(--secondary);\n --color-secondary-foreground: var(--secondary-foreground);\n --color-muted: var(--muted);\n --color-muted-foreground: var(--muted-foreground);\n --color-accent: var(--accent);\n --color-accent-foreground: var(--accent-foreground);\n --color-destructive: var(--destructive);\n --color-destructive-foreground: var(--destructive-foreground);\n --color-border: var(--border);\n --color-input: var(--input);\n --color-ring: var(--ring);\n --radius-sm: calc(var(--radius) - 4px);\n --radius-md: calc(var(--radius) - 2px);\n --radius-lg: var(--radius);\n --radius-xl: calc(var(--radius) + 4px);\n --color-sidebar: var(--sidebar);\n --color-sidebar-foreground: var(--sidebar-foreground);\n --color-sidebar-primary: var(--sidebar-primary);\n --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);\n --color-sidebar-accent: var(--sidebar-accent);\n --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);\n --color-sidebar-border: var(--sidebar-border);\n --color-sidebar-ring: var(--sidebar-ring);\n}\n\n@layer base {\n * {\n @apply border-border outline-ring/50;\n }\n body {\n @apply bg-background text-foreground;\n }\n\n button:not(:disabled),\n [role=\"button\"]:not(:disabled) {\n cursor: pointer;\n }\n}\n" },
|
|
@@ -560,7 +560,7 @@ const PRESETS = {
|
|
|
560
560
|
"tailwind-merge": "^3.5.0"
|
|
561
561
|
},
|
|
562
562
|
devDependencies: {
|
|
563
|
-
"tailwind-scrollbar": "^4.0.
|
|
563
|
+
"tailwind-scrollbar": "^4.0.2",
|
|
564
564
|
"tw-animate-css": "^1.4.0"
|
|
565
565
|
},
|
|
566
566
|
tailwindcss: { css: "@import \"tailwindcss\";\n@import \"tw-animate-css\";\n@plugin 'tailwind-scrollbar';\n\n@custom-variant dark (&:is(.dark *));\n\n:root {\n --background: oklch(1 0 0);\n --foreground: oklch(0.145 0 0);\n --card: oklch(1 0 0);\n --card-foreground: oklch(0.145 0 0);\n --popover: oklch(1 0 0);\n --popover-foreground: oklch(0.145 0 0);\n --primary: oklch(0.205 0 0);\n --primary-foreground: oklch(0.985 0 0);\n --secondary: oklch(0.97 0 0);\n --secondary-foreground: oklch(0.205 0 0);\n --muted: oklch(0.97 0 0);\n --muted-foreground: oklch(0.556 0 0);\n --accent: oklch(0.97 0 0);\n --accent-foreground: oklch(0.205 0 0);\n --destructive: oklch(0.577 0.245 27.325);\n --destructive-foreground: oklch(0.577 0.245 27.325);\n --border: oklch(0.922 0 0);\n --input: oklch(0.922 0 0);\n --ring: oklch(0.708 0 0);\n --radius: 0.625rem;\n --sidebar: oklch(0.985 0 0);\n --sidebar-foreground: oklch(0.145 0 0);\n --sidebar-primary: oklch(0.205 0 0);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.97 0 0);\n --sidebar-accent-foreground: oklch(0.205 0 0);\n --sidebar-border: oklch(0.922 0 0);\n --sidebar-ring: oklch(0.708 0 0);\n}\n\n.dark {\n --background: oklch(0.145 0 0);\n --foreground: oklch(0.985 0 0);\n --card: oklch(0.145 0 0);\n --card-foreground: oklch(0.985 0 0);\n --popover: oklch(0.145 0 0);\n --popover-foreground: oklch(0.985 0 0);\n --primary: oklch(0.985 0 0);\n --primary-foreground: oklch(0.205 0 0);\n --secondary: oklch(0.269 0 0);\n --secondary-foreground: oklch(0.985 0 0);\n --muted: oklch(0.269 0 0);\n --muted-foreground: oklch(0.708 0 0);\n --accent: oklch(0.269 0 0);\n --accent-foreground: oklch(0.985 0 0);\n --destructive: oklch(0.396 0.141 25.723);\n --destructive-foreground: oklch(0.637 0.237 25.331);\n --border: oklch(0.269 0 0);\n --input: oklch(0.269 0 0);\n --ring: oklch(0.439 0 0);\n --sidebar: oklch(0.205 0 0);\n --sidebar-foreground: oklch(0.985 0 0);\n --sidebar-primary: oklch(0.488 0.243 264.376);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.269 0 0);\n --sidebar-accent-foreground: oklch(0.985 0 0);\n --sidebar-border: oklch(0.269 0 0);\n --sidebar-ring: oklch(0.439 0 0);\n}\n\n@theme inline {\n --color-background: var(--background);\n --color-foreground: var(--foreground);\n --color-card: var(--card);\n --color-card-foreground: var(--card-foreground);\n --color-popover: var(--popover);\n --color-popover-foreground: var(--popover-foreground);\n --color-primary: var(--primary);\n --color-primary-foreground: var(--primary-foreground);\n --color-secondary: var(--secondary);\n --color-secondary-foreground: var(--secondary-foreground);\n --color-muted: var(--muted);\n --color-muted-foreground: var(--muted-foreground);\n --color-accent: var(--accent);\n --color-accent-foreground: var(--accent-foreground);\n --color-destructive: var(--destructive);\n --color-destructive-foreground: var(--destructive-foreground);\n --color-border: var(--border);\n --color-input: var(--input);\n --color-ring: var(--ring);\n --radius-sm: calc(var(--radius) - 4px);\n --radius-md: calc(var(--radius) - 2px);\n --radius-lg: var(--radius);\n --radius-xl: calc(var(--radius) + 4px);\n --color-sidebar: var(--sidebar);\n --color-sidebar-foreground: var(--sidebar-foreground);\n --color-sidebar-primary: var(--sidebar-primary);\n --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);\n --color-sidebar-accent: var(--sidebar-accent);\n --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);\n --color-sidebar-border: var(--sidebar-border);\n --color-sidebar-ring: var(--sidebar-ring);\n}\n\n@layer base {\n * {\n @apply border-border outline-ring/50;\n }\n body {\n @apply bg-background text-foreground;\n }\n\n button:not(:disabled),\n [role=\"button\"]:not(:disabled) {\n cursor: pointer;\n }\n}\n" },
|
|
@@ -877,14 +877,14 @@ const PRESETS = {
|
|
|
877
877
|
svelte: {
|
|
878
878
|
dependencies: {
|
|
879
879
|
"@sprawlify/svelte": "^0.0.102",
|
|
880
|
-
svelte: "^
|
|
880
|
+
svelte: "^5.54.0",
|
|
881
881
|
"class-variance-authority": "^0.7.1",
|
|
882
882
|
"lucide-svelte": "^0.400.0",
|
|
883
883
|
clsx: "^2.1.1",
|
|
884
884
|
"tailwind-merge": "^3.5.0"
|
|
885
885
|
},
|
|
886
886
|
devDependencies: {
|
|
887
|
-
"tailwind-scrollbar": "^4.0.
|
|
887
|
+
"tailwind-scrollbar": "^4.0.2",
|
|
888
888
|
"tw-animate-css": "^1.4.0"
|
|
889
889
|
},
|
|
890
890
|
tailwindcss: { css: "@import \"tailwindcss\";\n@import \"tw-animate-css\";\n@plugin 'tailwind-scrollbar';\n\n@custom-variant dark (&:is(.dark *));\n\n:root {\n --background: oklch(1 0 0);\n --foreground: oklch(0.145 0 0);\n --card: oklch(1 0 0);\n --card-foreground: oklch(0.145 0 0);\n --popover: oklch(1 0 0);\n --popover-foreground: oklch(0.145 0 0);\n --primary: oklch(0.205 0 0);\n --primary-foreground: oklch(0.985 0 0);\n --secondary: oklch(0.97 0 0);\n --secondary-foreground: oklch(0.205 0 0);\n --muted: oklch(0.97 0 0);\n --muted-foreground: oklch(0.556 0 0);\n --accent: oklch(0.97 0 0);\n --accent-foreground: oklch(0.205 0 0);\n --destructive: oklch(0.577 0.245 27.325);\n --destructive-foreground: oklch(0.577 0.245 27.325);\n --border: oklch(0.922 0 0);\n --input: oklch(0.922 0 0);\n --ring: oklch(0.708 0 0);\n --radius: 0.625rem;\n --sidebar: oklch(0.985 0 0);\n --sidebar-foreground: oklch(0.145 0 0);\n --sidebar-primary: oklch(0.205 0 0);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.97 0 0);\n --sidebar-accent-foreground: oklch(0.205 0 0);\n --sidebar-border: oklch(0.922 0 0);\n --sidebar-ring: oklch(0.708 0 0);\n}\n\n.dark {\n --background: oklch(0.145 0 0);\n --foreground: oklch(0.985 0 0);\n --card: oklch(0.145 0 0);\n --card-foreground: oklch(0.985 0 0);\n --popover: oklch(0.145 0 0);\n --popover-foreground: oklch(0.985 0 0);\n --primary: oklch(0.985 0 0);\n --primary-foreground: oklch(0.205 0 0);\n --secondary: oklch(0.269 0 0);\n --secondary-foreground: oklch(0.985 0 0);\n --muted: oklch(0.269 0 0);\n --muted-foreground: oklch(0.708 0 0);\n --accent: oklch(0.269 0 0);\n --accent-foreground: oklch(0.985 0 0);\n --destructive: oklch(0.396 0.141 25.723);\n --destructive-foreground: oklch(0.637 0.237 25.331);\n --border: oklch(0.269 0 0);\n --input: oklch(0.269 0 0);\n --ring: oklch(0.439 0 0);\n --sidebar: oklch(0.205 0 0);\n --sidebar-foreground: oklch(0.985 0 0);\n --sidebar-primary: oklch(0.488 0.243 264.376);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.269 0 0);\n --sidebar-accent-foreground: oklch(0.985 0 0);\n --sidebar-border: oklch(0.269 0 0);\n --sidebar-ring: oklch(0.439 0 0);\n}\n\n@theme inline {\n --color-background: var(--background);\n --color-foreground: var(--foreground);\n --color-card: var(--card);\n --color-card-foreground: var(--card-foreground);\n --color-popover: var(--popover);\n --color-popover-foreground: var(--popover-foreground);\n --color-primary: var(--primary);\n --color-primary-foreground: var(--primary-foreground);\n --color-secondary: var(--secondary);\n --color-secondary-foreground: var(--secondary-foreground);\n --color-muted: var(--muted);\n --color-muted-foreground: var(--muted-foreground);\n --color-accent: var(--accent);\n --color-accent-foreground: var(--accent-foreground);\n --color-destructive: var(--destructive);\n --color-destructive-foreground: var(--destructive-foreground);\n --color-border: var(--border);\n --color-input: var(--input);\n --color-ring: var(--ring);\n --radius-sm: calc(var(--radius) - 4px);\n --radius-md: calc(var(--radius) - 2px);\n --radius-lg: var(--radius);\n --radius-xl: calc(var(--radius) + 4px);\n --color-sidebar: var(--sidebar);\n --color-sidebar-foreground: var(--sidebar-foreground);\n --color-sidebar-primary: var(--sidebar-primary);\n --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);\n --color-sidebar-accent: var(--sidebar-accent);\n --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);\n --color-sidebar-border: var(--sidebar-border);\n --color-sidebar-ring: var(--sidebar-ring);\n}\n\n@layer base {\n * {\n @apply border-border outline-ring/50;\n }\n body {\n @apply bg-background text-foreground;\n }\n\n button:not(:disabled),\n [role=\"button\"]:not(:disabled) {\n cursor: pointer;\n }\n}\n" },
|
|
@@ -1676,7 +1676,7 @@ const PRESETS = {
|
|
|
1676
1676
|
"tailwind-merge": "^3.5.0"
|
|
1677
1677
|
},
|
|
1678
1678
|
devDependencies: {
|
|
1679
|
-
"tailwind-scrollbar": "^4.0.
|
|
1679
|
+
"tailwind-scrollbar": "^4.0.2",
|
|
1680
1680
|
"tw-animate-css": "^1.4.0"
|
|
1681
1681
|
},
|
|
1682
1682
|
tailwindcss: { css: "@import \"tailwindcss\";\n@import \"tw-animate-css\";\n@plugin 'tailwind-scrollbar';\n\n@custom-variant dark (&:is(.dark *));\n\n:root {\n --background: oklch(1 0 0);\n --foreground: oklch(0.145 0 0);\n --card: oklch(1 0 0);\n --card-foreground: oklch(0.145 0 0);\n --popover: oklch(1 0 0);\n --popover-foreground: oklch(0.145 0 0);\n --primary: oklch(0.205 0 0);\n --primary-foreground: oklch(0.985 0 0);\n --secondary: oklch(0.97 0 0);\n --secondary-foreground: oklch(0.205 0 0);\n --muted: oklch(0.97 0 0);\n --muted-foreground: oklch(0.556 0 0);\n --accent: oklch(0.97 0 0);\n --accent-foreground: oklch(0.205 0 0);\n --destructive: oklch(0.577 0.245 27.325);\n --destructive-foreground: oklch(0.577 0.245 27.325);\n --border: oklch(0.922 0 0);\n --input: oklch(0.922 0 0);\n --ring: oklch(0.708 0 0);\n --radius: 0.625rem;\n --sidebar: oklch(0.985 0 0);\n --sidebar-foreground: oklch(0.145 0 0);\n --sidebar-primary: oklch(0.205 0 0);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.97 0 0);\n --sidebar-accent-foreground: oklch(0.205 0 0);\n --sidebar-border: oklch(0.922 0 0);\n --sidebar-ring: oklch(0.708 0 0);\n}\n\n.dark {\n --background: oklch(0.145 0 0);\n --foreground: oklch(0.985 0 0);\n --card: oklch(0.145 0 0);\n --card-foreground: oklch(0.985 0 0);\n --popover: oklch(0.145 0 0);\n --popover-foreground: oklch(0.985 0 0);\n --primary: oklch(0.985 0 0);\n --primary-foreground: oklch(0.205 0 0);\n --secondary: oklch(0.269 0 0);\n --secondary-foreground: oklch(0.985 0 0);\n --muted: oklch(0.269 0 0);\n --muted-foreground: oklch(0.708 0 0);\n --accent: oklch(0.269 0 0);\n --accent-foreground: oklch(0.985 0 0);\n --destructive: oklch(0.396 0.141 25.723);\n --destructive-foreground: oklch(0.637 0.237 25.331);\n --border: oklch(0.269 0 0);\n --input: oklch(0.269 0 0);\n --ring: oklch(0.439 0 0);\n --sidebar: oklch(0.205 0 0);\n --sidebar-foreground: oklch(0.985 0 0);\n --sidebar-primary: oklch(0.488 0.243 264.376);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.269 0 0);\n --sidebar-accent-foreground: oklch(0.985 0 0);\n --sidebar-border: oklch(0.269 0 0);\n --sidebar-ring: oklch(0.439 0 0);\n}\n\n@theme inline {\n --color-background: var(--background);\n --color-foreground: var(--foreground);\n --color-card: var(--card);\n --color-card-foreground: var(--card-foreground);\n --color-popover: var(--popover);\n --color-popover-foreground: var(--popover-foreground);\n --color-primary: var(--primary);\n --color-primary-foreground: var(--primary-foreground);\n --color-secondary: var(--secondary);\n --color-secondary-foreground: var(--secondary-foreground);\n --color-muted: var(--muted);\n --color-muted-foreground: var(--muted-foreground);\n --color-accent: var(--accent);\n --color-accent-foreground: var(--accent-foreground);\n --color-destructive: var(--destructive);\n --color-destructive-foreground: var(--destructive-foreground);\n --color-border: var(--border);\n --color-input: var(--input);\n --color-ring: var(--ring);\n --radius-sm: calc(var(--radius) - 4px);\n --radius-md: calc(var(--radius) - 2px);\n --radius-lg: var(--radius);\n --radius-xl: calc(var(--radius) + 4px);\n --color-sidebar: var(--sidebar);\n --color-sidebar-foreground: var(--sidebar-foreground);\n --color-sidebar-primary: var(--sidebar-primary);\n --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);\n --color-sidebar-accent: var(--sidebar-accent);\n --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);\n --color-sidebar-border: var(--sidebar-border);\n --color-sidebar-ring: var(--sidebar-ring);\n}\n\n@layer base {\n * {\n @apply border-border outline-ring/50;\n }\n body {\n @apply bg-background text-foreground;\n }\n\n button:not(:disabled),\n [role=\"button\"]:not(:disabled) {\n cursor: pointer;\n }\n}\n" },
|
|
@@ -2704,8 +2704,7 @@ dist-ssr
|
|
|
2704
2704
|
"globals": "^17.4.0",
|
|
2705
2705
|
"tailwindcss": "^4.2.2",
|
|
2706
2706
|
"typescript": "^5.9.3",
|
|
2707
|
-
"vite": "^8.0.1"
|
|
2708
|
-
"vite-tsconfig-paths": "^6.1.1"
|
|
2707
|
+
"vite": "^8.0.1"
|
|
2709
2708
|
}
|
|
2710
2709
|
}`
|
|
2711
2710
|
},
|
|
@@ -2733,10 +2732,7 @@ dist-ssr
|
|
|
2733
2732
|
"noUnusedParameters": true,
|
|
2734
2733
|
"erasableSyntaxOnly": true,
|
|
2735
2734
|
"noFallthroughCasesInSwitch": true,
|
|
2736
|
-
"noUncheckedSideEffectImports": true
|
|
2737
|
-
"paths": {
|
|
2738
|
-
"@/*": ["./src/*"]
|
|
2739
|
-
}
|
|
2735
|
+
"noUncheckedSideEffectImports": true
|
|
2740
2736
|
},
|
|
2741
2737
|
"include": ["src"]
|
|
2742
2738
|
}`
|
|
@@ -2748,7 +2744,12 @@ dist-ssr
|
|
|
2748
2744
|
"references": [
|
|
2749
2745
|
{ "path": "./tsconfig.app.json" },
|
|
2750
2746
|
{ "path": "./tsconfig.node.json" }
|
|
2751
|
-
]
|
|
2747
|
+
],
|
|
2748
|
+
"compilerOptions": {
|
|
2749
|
+
"paths": {
|
|
2750
|
+
"@/*": ["./src/*"]
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2752
2753
|
}`
|
|
2753
2754
|
},
|
|
2754
2755
|
{
|
|
@@ -2773,10 +2774,7 @@ dist-ssr
|
|
|
2773
2774
|
"noUnusedParameters": true,
|
|
2774
2775
|
"erasableSyntaxOnly": true,
|
|
2775
2776
|
"noFallthroughCasesInSwitch": true,
|
|
2776
|
-
"noUncheckedSideEffectImports": true
|
|
2777
|
-
"paths": {
|
|
2778
|
-
"@/*": ["./src/*"]
|
|
2779
|
-
}
|
|
2777
|
+
"noUncheckedSideEffectImports": true
|
|
2780
2778
|
},
|
|
2781
2779
|
"include": ["vite.config.ts"]
|
|
2782
2780
|
}`
|
|
@@ -2786,10 +2784,12 @@ dist-ssr
|
|
|
2786
2784
|
content: `import { defineConfig } from "vite"
|
|
2787
2785
|
import react from "@vitejs/plugin-react"
|
|
2788
2786
|
import tailwindcss from "@tailwindcss/vite"
|
|
2789
|
-
import tsconfigPaths from "vite-tsconfig-paths";
|
|
2790
2787
|
|
|
2791
2788
|
export default defineConfig({
|
|
2792
|
-
|
|
2789
|
+
resolve: {
|
|
2790
|
+
tsconfigPaths: true,
|
|
2791
|
+
},
|
|
2792
|
+
plugins: [tailwindcss(), react()],
|
|
2793
2793
|
})`
|
|
2794
2794
|
}
|
|
2795
2795
|
] }),
|
|
@@ -2922,7 +2922,12 @@ dist-ssr
|
|
|
2922
2922
|
"references": [
|
|
2923
2923
|
{ "path": "./tsconfig.app.json" },
|
|
2924
2924
|
{ "path": "./tsconfig.node.json" }
|
|
2925
|
-
]
|
|
2925
|
+
],
|
|
2926
|
+
"compilerOptions": {
|
|
2927
|
+
"paths": {
|
|
2928
|
+
"@/*": ["./src/*"]
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2926
2931
|
}`
|
|
2927
2932
|
},
|
|
2928
2933
|
{
|
|
@@ -2959,6 +2964,9 @@ import solid from "vite-plugin-solid"
|
|
|
2959
2964
|
import tailwindcss from "@tailwindcss/vite"
|
|
2960
2965
|
|
|
2961
2966
|
export default defineConfig({
|
|
2967
|
+
resolve: {
|
|
2968
|
+
tsconfigPaths: true,
|
|
2969
|
+
},
|
|
2962
2970
|
plugins: [tailwindcss(), solid()],
|
|
2963
2971
|
})`
|
|
2964
2972
|
}
|
|
@@ -3034,8 +3042,7 @@ dist-ssr
|
|
|
3034
3042
|
"scripts": {
|
|
3035
3043
|
"dev": "vite",
|
|
3036
3044
|
"build": "vite build",
|
|
3037
|
-
"preview": "vite preview"
|
|
3038
|
-
"check": "svelte-check --tsconfig ./tsconfig.app.json && tsc -p tsconfig.node.json"
|
|
3045
|
+
"preview": "vite preview"
|
|
3039
3046
|
},
|
|
3040
3047
|
"dependencies": {
|
|
3041
3048
|
"@sprawlify/primitives": "^0.0.102",
|
|
@@ -3047,10 +3054,10 @@ dist-ssr
|
|
|
3047
3054
|
"@tsconfig/svelte": "^5.0.8",
|
|
3048
3055
|
"@types/node": "^24.12.0",
|
|
3049
3056
|
"svelte": "^5.54.0",
|
|
3050
|
-
"svelte-check": "^4.4.5",
|
|
3051
3057
|
"tailwindcss": "^4.2.2",
|
|
3052
3058
|
"typescript": "^5.9.3",
|
|
3053
|
-
"vite": "^8.0.1"
|
|
3059
|
+
"vite": "^8.0.1",
|
|
3060
|
+
"vite-tsconfig-paths": "^6.1.1"
|
|
3054
3061
|
}
|
|
3055
3062
|
}`
|
|
3056
3063
|
},
|
|
@@ -3084,7 +3091,12 @@ export default {}`
|
|
|
3084
3091
|
"references": [
|
|
3085
3092
|
{ "path": "./tsconfig.app.json" },
|
|
3086
3093
|
{ "path": "./tsconfig.node.json" }
|
|
3087
|
-
]
|
|
3094
|
+
],
|
|
3095
|
+
"compilerOptions": {
|
|
3096
|
+
"paths": {
|
|
3097
|
+
"@/*": ["./src/*"]
|
|
3098
|
+
}
|
|
3099
|
+
}
|
|
3088
3100
|
}`
|
|
3089
3101
|
},
|
|
3090
3102
|
{
|
|
@@ -3121,6 +3133,9 @@ import { svelte } from "@sveltejs/vite-plugin-svelte"
|
|
|
3121
3133
|
import tailwindcss from "@tailwindcss/vite"
|
|
3122
3134
|
|
|
3123
3135
|
export default defineConfig({
|
|
3136
|
+
resolve: {
|
|
3137
|
+
tsconfigPaths: true,
|
|
3138
|
+
},
|
|
3124
3139
|
plugins: [tailwindcss(), svelte()],
|
|
3125
3140
|
})`
|
|
3126
3141
|
}
|
|
@@ -3238,7 +3253,12 @@ dist-ssr
|
|
|
3238
3253
|
"references": [
|
|
3239
3254
|
{ "path": "./tsconfig.app.json" },
|
|
3240
3255
|
{ "path": "./tsconfig.node.json" }
|
|
3241
|
-
]
|
|
3256
|
+
],
|
|
3257
|
+
"compilerOptions": {
|
|
3258
|
+
"paths": {
|
|
3259
|
+
"@/*": ["./src/*"]
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3242
3262
|
}`
|
|
3243
3263
|
},
|
|
3244
3264
|
{
|
|
@@ -3275,6 +3295,9 @@ import vue from "@vitejs/plugin-vue"
|
|
|
3275
3295
|
import tailwindcss from "@tailwindcss/vite"
|
|
3276
3296
|
|
|
3277
3297
|
export default defineConfig({
|
|
3298
|
+
resolve: {
|
|
3299
|
+
tsconfigPaths: true,
|
|
3300
|
+
},
|
|
3278
3301
|
plugins: [tailwindcss(), vue()],
|
|
3279
3302
|
})`
|
|
3280
3303
|
}
|
|
@@ -3361,16 +3384,24 @@ async function applyPresetPackageDependencies(cwd, frameworkPreset, packageNames
|
|
|
3361
3384
|
}
|
|
3362
3385
|
continue;
|
|
3363
3386
|
}
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
}
|
|
3370
|
-
continue;
|
|
3387
|
+
}
|
|
3388
|
+
if (frameworkPreset.devDependencies) {
|
|
3389
|
+
for (const [devDependencyName, devDependencyVersion] of Object.entries(frameworkPreset.devDependencies)) if (!packageJson.devDependencies[devDependencyName]) {
|
|
3390
|
+
packageJson.devDependencies[devDependencyName] = devDependencyVersion;
|
|
3391
|
+
didChange = true;
|
|
3371
3392
|
}
|
|
3372
3393
|
}
|
|
3373
|
-
if (didChange)
|
|
3394
|
+
if (didChange) {
|
|
3395
|
+
if (packageJson.dependencies && Object.keys(packageJson.dependencies).length > 0) packageJson.dependencies = Object.keys(packageJson.dependencies).sort().reduce((sorted, key) => {
|
|
3396
|
+
sorted[key] = packageJson.dependencies[key];
|
|
3397
|
+
return sorted;
|
|
3398
|
+
}, {});
|
|
3399
|
+
if (packageJson.devDependencies && Object.keys(packageJson.devDependencies).length > 0) packageJson.devDependencies = Object.keys(packageJson.devDependencies).sort().reduce((sorted, key) => {
|
|
3400
|
+
sorted[key] = packageJson.devDependencies[key];
|
|
3401
|
+
return sorted;
|
|
3402
|
+
}, {});
|
|
3403
|
+
await fsExtra.writeJson(packageJsonPath, packageJson, { spaces: 2 });
|
|
3404
|
+
}
|
|
3374
3405
|
}
|
|
3375
3406
|
async function runInit(options) {
|
|
3376
3407
|
let cwd = options.cwd;
|
|
@@ -3382,16 +3413,10 @@ async function runInit(options) {
|
|
|
3382
3413
|
const selectedTemplate = options.framework && options.framework in templates ? templates[options.framework] : void 0;
|
|
3383
3414
|
if (selectedTemplate?.files.length) for (const file of selectedTemplate.files) {
|
|
3384
3415
|
const targetPath = path.resolve(cwd, file.path);
|
|
3385
|
-
if (fsExtra.existsSync(targetPath) && !options.override) {
|
|
3386
|
-
logger.warn(`Skipping ${highlighter.info(file.path)} because it already exists. Use ${highlighter.info("--override")} to replace it.`);
|
|
3387
|
-
continue;
|
|
3388
|
-
}
|
|
3389
3416
|
await fsExtra.ensureDir(path.dirname(targetPath));
|
|
3390
3417
|
await fsExtra.writeFile(targetPath, file.content, "utf8");
|
|
3391
|
-
logger.success(`Created ${highlighter.info(file.path)} template file.`);
|
|
3392
3418
|
}
|
|
3393
3419
|
const componentsJsonPath = path.resolve(cwd, "components.json");
|
|
3394
|
-
logger.info("Starting project initialization...");
|
|
3395
3420
|
const frameworkPreset = getFrameworkPreset(options.preset, options.framework);
|
|
3396
3421
|
const tailwindcss = {
|
|
3397
3422
|
cwd: tailwindCssPathPrefix(cwd),
|
|
@@ -3423,7 +3448,6 @@ async function runInit(options) {
|
|
|
3423
3448
|
if (backupPath && fsExtra.existsSync(backupPath)) {
|
|
3424
3449
|
fsExtra.copyFileSync(backupPath, componentsJsonPath);
|
|
3425
3450
|
fsExtra.unlinkSync(backupPath);
|
|
3426
|
-
logger.info("Restored original configuration file.");
|
|
3427
3451
|
}
|
|
3428
3452
|
throw error;
|
|
3429
3453
|
}
|
|
@@ -3434,7 +3458,6 @@ async function runInit(options) {
|
|
|
3434
3458
|
return;
|
|
3435
3459
|
}
|
|
3436
3460
|
await applyPresetPackageDependencies(cwd, frameworkPreset, packageNames);
|
|
3437
|
-
logger.info(`Applying preset components: ${itemsToApply.map((item) => highlighter.info(item.name)).join(", ")}.`);
|
|
3438
3461
|
for (const item of itemsToApply) for (const file of item.files ?? []) {
|
|
3439
3462
|
const targetPath = resolvePresetFilePath(cwd, file);
|
|
3440
3463
|
if (fsExtra.existsSync(targetPath) && !options.override) {
|
|
@@ -3443,12 +3466,21 @@ async function runInit(options) {
|
|
|
3443
3466
|
}
|
|
3444
3467
|
await fsExtra.ensureDir(path.dirname(targetPath));
|
|
3445
3468
|
await fsExtra.writeFile(targetPath, file.content, "utf8");
|
|
3446
|
-
logger.success(`Created ${highlighter.info(path.relative(cwd, targetPath))} from preset component ${highlighter.info(item.name)}.`);
|
|
3447
3469
|
}
|
|
3448
3470
|
}
|
|
3449
3471
|
//#endregion
|
|
3472
|
+
//#region src/commands/init/done.ts
|
|
3473
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
3474
|
+
async function doneInit(options) {
|
|
3475
|
+
const projectDir = path.relative(process.cwd(), options.cwd);
|
|
3476
|
+
logger.log(`\nThat's it!`);
|
|
3477
|
+
logger.log(`Enter your project directory using ${highlighter.info(`cd .${path.sep}${projectDir}`)}.`);
|
|
3478
|
+
logger.log(`Install dependencies using ${highlighter.info("npm install")}.`);
|
|
3479
|
+
await sleep(200);
|
|
3480
|
+
}
|
|
3481
|
+
//#endregion
|
|
3450
3482
|
//#region src/commands/init.ts
|
|
3451
|
-
const init = new Command().name("init").alias("create").description("initialize your project and install dependencies").argument("[components...]", "names, url or local path to component").option("-p, --preset <preset>", "the preset to use. (monochrome, clay)").option("-f, --framework <framework>", "the framework to use. (react, solid, svelte, vue)").option("--metaframework <metaframework>", "the metaframework to use. (next, react-router, nuxt, sveltekit)").option("-y, --yes", "skip confirmation prompt.", true).option("-d, --defaults", "use default configuration: --preset=monochrome --framework=react --metaframework=
|
|
3483
|
+
const init = new Command().name("init").alias("create").description("initialize your project and install dependencies").argument("[components...]", "names, url or local path to component").option("-p, --preset <preset>", "the preset to use. (monochrome, clay)").option("-f, --framework <framework>", "the framework to use. (react, solid, svelte, vue)").option("--metaframework <metaframework>", "the metaframework to use. (next, react-router, nuxt, sveltekit)").option("-y, --yes", "skip confirmation prompt.", true).option("-d, --defaults", "use default configuration: --preset=monochrome --framework=react --metaframework=none", false).option("-o, --override", "override existing configuration.", false).option("-c, --cwd <cwd>", "the working directory. defaults to the current directory.", process.cwd()).option("-n, --name <name>", "the name for the new project.").option("-s, --silent", "mute output.", false).option("--reinstall", "re-install existing UI components.").option("--no-reinstall", "do not re-install existing UI components.").action(async (components, opts) => {
|
|
3452
3484
|
try {
|
|
3453
3485
|
const options = parseInitOptions(opts);
|
|
3454
3486
|
applyDefaultInitOptions(options);
|
|
@@ -3458,8 +3490,7 @@ const init = new Command().name("init").alias("create").description("initialize
|
|
|
3458
3490
|
options.components = components;
|
|
3459
3491
|
await loadEnvFiles(options.cwd);
|
|
3460
3492
|
await runInit(options);
|
|
3461
|
-
|
|
3462
|
-
logger.log(`Project initialization completed in ${highlighter.info(options.cwd)}.\nYou may now add components.`);
|
|
3493
|
+
await doneInit(options);
|
|
3463
3494
|
deleteFileBackup(path.resolve(options.cwd, "components.json"));
|
|
3464
3495
|
logger.break();
|
|
3465
3496
|
} catch (error) {
|