mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(cli): add nuxt + convex support (#458)
This commit is contained in:
@@ -9,9 +9,7 @@ export async function getBackendFrameworkChoice(
|
||||
): Promise<Backend> {
|
||||
if (backendFramework !== undefined) return backendFramework;
|
||||
|
||||
const hasIncompatibleFrontend = frontends?.some(
|
||||
(f) => f === "nuxt" || f === "solid",
|
||||
);
|
||||
const hasIncompatibleFrontend = frontends?.some((f) => f === "solid");
|
||||
|
||||
const backendOptions: Array<{
|
||||
value: Backend;
|
||||
@@ -59,15 +57,10 @@ export async function getBackendFrameworkChoice(
|
||||
hint: "No backend server",
|
||||
});
|
||||
|
||||
let initialValue = DEFAULT_CONFIG.backend;
|
||||
if (hasIncompatibleFrontend && initialValue === "convex") {
|
||||
initialValue = "hono";
|
||||
}
|
||||
|
||||
const response = await select<Backend>({
|
||||
message: "Select backend",
|
||||
options: backendOptions,
|
||||
initialValue,
|
||||
initialValue: DEFAULT_CONFIG.backend,
|
||||
});
|
||||
|
||||
if (isCancel(response)) {
|
||||
|
||||
@@ -75,7 +75,7 @@ export async function getFrontendChoice(
|
||||
|
||||
const webOptions = allWebOptions.filter((option) => {
|
||||
if (backend === "convex") {
|
||||
return option.value !== "nuxt" && option.value !== "solid";
|
||||
return option.value !== "solid";
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user