add solid-start support

This commit is contained in:
Gregor Lohaus
2026-04-16 13:35:26 +02:00
parent e35a038f09
commit 73dc856821
7 changed files with 62 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ import { initRenderer } from '@gregorlohaus/tdir'
import { z } from 'zod'
import path from "node:path";
p.intro("create-glstack");
p.intro(`create-glstack ${process.env.GLSTACK_DEV && 'isDev'}`);
const project = await p.group(
{
@@ -44,12 +44,14 @@ const project = await p.group(
},
}
);
const createRenderer = initRenderer(path.join(import.meta.dir, '..', 'template'))
const templateDir = (process.env.GLSTACK_DEV == 'true' ? './template' : path.join(import.meta.dir, '..', 'template'))
const createRenderer = initRenderer(templateDir)
const render = createRenderer(z.object({
project: z.object({
name: z.string(),
goprefix: z.string(),
frontend: z.literal("svelte-kit").or(z.literal("solid-start"))
frontend: z.string(),
})
}))
const destDir = path.join("./",project.name);