mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add nextjs frontend and backend
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
import { cancel, isCancel, select } from "@clack/prompts";
|
||||
import pc from "picocolors";
|
||||
import { DEFAULT_CONFIG } from "../constants";
|
||||
import type { ProjectRuntime } from "../types";
|
||||
import type { ProjectBackend, ProjectRuntime } from "../types";
|
||||
|
||||
export async function getRuntimeChoice(
|
||||
runtime?: ProjectRuntime,
|
||||
backend?: ProjectBackend,
|
||||
): Promise<ProjectRuntime> {
|
||||
if (runtime !== undefined) return runtime;
|
||||
|
||||
if (backend === "next") {
|
||||
return "node";
|
||||
}
|
||||
|
||||
const response = await select<ProjectRuntime>({
|
||||
message: "Select runtime",
|
||||
options: [
|
||||
|
||||
Reference in New Issue
Block a user