expo template

This commit is contained in:
2026-06-02 12:01:39 +02:00
parent 7923514c5c
commit cc596e632f
40 changed files with 407 additions and 17 deletions

View File

@@ -18,13 +18,22 @@ const project = await p.group(
return undefined
},
}),
frontend: async () =>
frontend: async () =>
await p.select({
message: 'Pick a frontend framework.',
options: [
{value: "svelte-kit", label:"SvelteKit"},
{value: "solid-start", label:"SolidStart"},
{value: "none", label:"None"}
{ value: "svelte-kit", label: "SvelteKit" },
{ value: "solid-start", label: "SolidStart" },
{ value: "none", label: "None" }
]
})
,
mobile: async () =>
await p.select({
message: 'Pick a mobile framework.',
options: [
{ value: "expo", label: "ReactNative + Expo" },
{ value: "none", label: "None" }
]
})
,
@@ -55,15 +64,18 @@ const render = createRenderer(z.object({
frontend: z.string(),
})
}))
const destDir = path.join("./",project.name);
render(destDir,{project},{reverseMap: true})
const destDir = path.join("./", project.name);
render(destDir, { project }, { reverseMap: true })
const s = p.spinner();
s.start("Installing dependencies");
await Bun.$`bun install`.cwd(path.join(destDir)).quiet();
await Bun.$`bun install`.cwd(path.join(destDir,'packages','rpc')).quiet();
await Bun.$`bun install`.cwd(path.join(destDir, 'packages', 'rpc')).quiet();
if (project.frontend !== "none") {
await Bun.$`bun install`.cwd(path.join(destDir,'apps','web')).quiet();
await Bun.$`bun install`.cwd(path.join(destDir, 'apps', 'web')).quiet();
}
if (project.mobile !== "none") {
await Bun.$`bun install`.cwd(path.join(destDir, 'apps', 'mobile')).quiet();
}
s.stop("Dependencies installed.");