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

@@ -13,6 +13,7 @@ export async function setupApi(config: ProjectConfig): Promise<void> {
["tanstack-router", "react-router", "tanstack-start", "next"].includes(f),
);
const hasNuxtWeb = frontend.includes("nuxt");
const hasSvelteWeb = frontend.includes("svelte");
if (api === "orpc") {
await addPackageDependency({
@@ -61,6 +62,13 @@ export async function setupApi(config: ProjectConfig): Promise<void> {
projectDir: webDir,
});
}
} else if (hasSvelteWeb) {
if (api === "orpc") {
await addPackageDependency({
dependencies: ["@orpc/svelte-query", "@orpc/client", "@orpc/server"],
projectDir: webDir,
});
}
}
}