add svelte

This commit is contained in:
Aman Varshney
2025-04-26 08:12:01 +05:30
parent 0e8af094da
commit 8adf020c2a
45 changed files with 1212 additions and 97 deletions

View File

@@ -0,0 +1 @@
<svg viewBox="0 0 256 308" width="256" height="308" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid"><path d="M239.682 40.707C211.113-.182 154.69-12.301 113.895 13.69L42.247 59.356a82.198 82.198 0 0 0-37.135 55.056 86.566 86.566 0 0 0 8.536 55.576 82.425 82.425 0 0 0-12.296 30.719 87.596 87.596 0 0 0 14.964 66.244c28.574 40.893 84.997 53.007 125.787 27.016l71.648-45.664a82.182 82.182 0 0 0 37.135-55.057 86.601 86.601 0 0 0-8.53-55.577 82.409 82.409 0 0 0 12.29-30.718 87.573 87.573 0 0 0-14.963-66.244" fill="#FF3E00"/><path d="M106.889 270.841c-23.102 6.007-47.497-3.036-61.103-22.648a52.685 52.685 0 0 1-9.003-39.85 49.978 49.978 0 0 1 1.713-6.693l1.35-4.115 3.671 2.697a92.447 92.447 0 0 0 28.036 14.007l2.663.808-.245 2.659a16.067 16.067 0 0 0 2.89 10.656 17.143 17.143 0 0 0 18.397 6.828 15.786 15.786 0 0 0 4.403-1.935l71.67-45.672a14.922 14.922 0 0 0 6.734-9.977 15.923 15.923 0 0 0-2.713-12.011 17.156 17.156 0 0 0-18.404-6.832 15.78 15.78 0 0 0-4.396 1.933l-27.35 17.434a52.298 52.298 0 0 1-14.553 6.391c-23.101 6.007-47.497-3.036-61.101-22.649a52.681 52.681 0 0 1-9.004-39.849 49.428 49.428 0 0 1 22.34-33.114l71.664-45.677a52.218 52.218 0 0 1 14.563-6.398c23.101-6.007 47.497 3.036 61.101 22.648a52.685 52.685 0 0 1 9.004 39.85 50.559 50.559 0 0 1-1.713 6.692l-1.35 4.116-3.67-2.693a92.373 92.373 0 0 0-28.037-14.013l-2.664-.809.246-2.658a16.099 16.099 0 0 0-2.89-10.656 17.143 17.143 0 0 0-18.398-6.828 15.786 15.786 0 0 0-4.402 1.935l-71.67 45.674a14.898 14.898 0 0 0-6.73 9.975 15.9 15.9 0 0 0 2.709 12.012 17.156 17.156 0 0 0 18.404 6.832 15.841 15.841 0 0 0 4.402-1.935l27.345-17.427a52.147 52.147 0 0 1 14.552-6.397c23.101-6.006 47.497 3.037 61.102 22.65a52.681 52.681 0 0 1 9.003 39.848 49.453 49.453 0 0 1-22.34 33.12l-71.664 45.673a52.218 52.218 0 0 1-14.563 6.398" fill="#FFF"/></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -78,14 +78,23 @@ const CATEGORY_ORDER: Array<keyof typeof TECH_OPTIONS> = [
const hasWebFrontend = (frontend: string[]) =>
frontend.some((f) =>
["tanstack-router", "react-router", "tanstack-start", "next"].includes(f),
[
"tanstack-router",
"react-router",
"tanstack-start",
"next",
"nuxt",
"svelte",
].includes(f),
);
const hasPWACompatibleFrontend = (frontend: string[]) =>
frontend.some((f) => ["tanstack-router", "react-router"].includes(f));
const hasTauriCompatibleFrontend = (frontend: string[]) =>
frontend.some((f) => ["tanstack-router", "react-router", "nuxt"].includes(f));
frontend.some((f) =>
["tanstack-router", "react-router", "nuxt", "svelte"].includes(f),
);
const hasNativeFrontend = (frontend: string[]) => frontend.includes("native");
@@ -216,6 +225,7 @@ const StackArchitect = () => {
const isPWACompat = hasPWACompatibleFrontend(nextStack.frontend);
const isTauriCompat = hasTauriCompatibleFrontend(nextStack.frontend);
const isNuxt = nextStack.frontend.includes("nuxt");
const isSvelte = nextStack.frontend.includes("svelte");
if (nextStack.database === "none") {
if (nextStack.orm !== "none") {
@@ -270,7 +280,7 @@ const StackArchitect = () => {
changed = true;
}
if (isNuxt && nextStack.api === "trpc") {
if ((isNuxt || isSvelte) && nextStack.api === "trpc") {
nextStack.api = "orpc";
changed = true;
}
@@ -446,6 +456,7 @@ const StackArchitect = () => {
const isPWACompat = currentHasPWACompatibleFrontend;
const isTauriCompat = currentHasTauriCompatibleFrontend;
const isNuxt = stack.frontend.includes("nuxt");
const isSvelte = stack.frontend.includes("svelte");
if (!isPWACompat && stack.addons.includes("pwa")) {
notes.frontend.notes.push("PWA addon requires TanStack or React Router.");
@@ -466,9 +477,12 @@ const StackArchitect = () => {
notes.examples.hasIssue = true;
}
if (isNuxt && stack.api === "trpc") {
if ((isNuxt || isSvelte) && stack.api === "trpc") {
notes.api.notes.push(
"Nuxt requires oRPC. It will be selected automatically.",
`${
isNuxt ? "Nuxt" : "Svelte"
} requires oRPC. It will be selected automatically.`,
);
notes.api.hasIssue = true;
notes.frontend.hasIssue = true;
@@ -630,6 +644,7 @@ const StackArchitect = () => {
"tanstack-start",
"next",
"nuxt",
"svelte",
];
if (techId === "none") {
@@ -718,6 +733,9 @@ const StackArchitect = () => {
if (techId === "trpc" && stack.frontend.includes("nuxt")) {
return "tRPC is not supported with Nuxt. Use oRPC instead.";
}
if (techId === "trpc" && stack.frontend.includes("svelte")) {
return "tRPC is not supported with Svelte. Use oRPC instead.";
}
}
if (catKey === "orm") {

View File

@@ -58,6 +58,14 @@ export const TECH_OPTIONS = {
color: "from-green-400 to-green-700",
default: false,
},
{
id: "svelte",
name: "Svelte",
description: "Cybernetically enhanced web apps",
icon: "/icon/svelte.svg",
color: "from-orange-500 to-orange-700",
default: false,
},
{
id: "native",
name: "React Native",