mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add tauri option for nextjs
This commit is contained in:
@@ -14,6 +14,7 @@ export async function setupAddons(config: ProjectConfig) {
|
||||
const hasNuxtFrontend = frontend.includes("nuxt");
|
||||
const hasSvelteFrontend = frontend.includes("svelte");
|
||||
const hasSolidFrontend = frontend.includes("solid");
|
||||
const hasNextFrontend = frontend.includes("next");
|
||||
|
||||
if (addons.includes("turborepo")) {
|
||||
await addPackageDependency({
|
||||
@@ -30,7 +31,8 @@ export async function setupAddons(config: ProjectConfig) {
|
||||
(hasReactWebFrontend ||
|
||||
hasNuxtFrontend ||
|
||||
hasSvelteFrontend ||
|
||||
hasSolidFrontend)
|
||||
hasSolidFrontend ||
|
||||
hasNextFrontend)
|
||||
) {
|
||||
await setupTauri(config);
|
||||
}
|
||||
|
||||
@@ -45,17 +45,22 @@ export async function setupTauri(config: ProjectConfig): Promise<void> {
|
||||
const hasNuxt = frontend.includes("nuxt");
|
||||
const hasSvelte = frontend.includes("svelte");
|
||||
const hasSolid = frontend.includes("solid");
|
||||
const hasNext = frontend.includes("next");
|
||||
|
||||
const devUrl =
|
||||
hasReactRouter || hasSvelte
|
||||
? "http://localhost:5173"
|
||||
: "http://localhost:3001";
|
||||
: hasNext
|
||||
? "http://localhost:3001"
|
||||
: "http://localhost:3001";
|
||||
|
||||
const frontendDist = hasNuxt
|
||||
? "../.output/public"
|
||||
: hasSvelte
|
||||
? "../build"
|
||||
: "../dist";
|
||||
: hasNext
|
||||
? "../.next"
|
||||
: "../dist";
|
||||
|
||||
const tauriArgs = [
|
||||
"init",
|
||||
|
||||
Reference in New Issue
Block a user