export const TEMPLATES = [ { value: "next", title: "Next.js", logo: 'Next.js', }, { value: "vite", title: "Vite", logo: '', }, { value: "start", title: "TanStack Start", logo: 'TanStack', }, { value: "laravel", title: "Laravel", logo: 'Laravel', }, { value: "react-router", title: "React Router", logo: '', }, { value: "astro", title: "Astro", logo: 'Astro', }, ] as const export type TemplateValue = (typeof TEMPLATES)[number]["value"] // Extract the base framework from a template value (e.g. "next-monorepo" -> "next"). export function getFramework(template: string) { return template.replace("-monorepo", "") as TemplateValue } // Frameworks that don't support the monorepo template. export const NO_MONOREPO_FRAMEWORKS = ["laravel"] as const // Build the full template value from a framework and monorepo flag. export function getTemplateValue(framework: string, monorepo: boolean) { if ( NO_MONOREPO_FRAMEWORKS.includes( framework as (typeof NO_MONOREPO_FRAMEWORKS)[number] ) ) { return framework } return monorepo ? `${framework}-monorepo` : framework }