mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add svelte
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user