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 setupAddons(config: ProjectConfig) {
const hasReactWebFrontend =
frontend.includes("react-router") || frontend.includes("tanstack-router");
const hasNuxtFrontend = frontend.includes("nuxt");
const hasSvelteFrontend = frontend.includes("svelte");
if (addons.includes("turborepo")) {
await addPackageDependency({
@@ -24,7 +25,10 @@ export async function setupAddons(config: ProjectConfig) {
if (addons.includes("pwa") && hasReactWebFrontend) {
await setupPwa(projectDir, frontend);
}
if (addons.includes("tauri") && (hasReactWebFrontend || hasNuxtFrontend)) {
if (
addons.includes("tauri") &&
(hasReactWebFrontend || hasNuxtFrontend || hasSvelteFrontend)
) {
await setupTauri(config);
}
if (addons.includes("biome")) {
@@ -38,10 +42,17 @@ export async function setupAddons(config: ProjectConfig) {
}
}
export function getWebAppDir(
function getWebAppDir(
projectDir: string,
frontends: ProjectFrontend[],
): string {
if (
frontends.some((f) =>
["react-router", "tanstack-router", "nuxt", "svelte"].includes(f),
)
) {
return path.join(projectDir, "apps/web");
}
return path.join(projectDir, "apps/web");
}