mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add todo, ai template for next
This commit is contained in:
@@ -494,6 +494,20 @@ export async function setupExamplesTemplate(
|
||||
|
||||
const exampleBaseDir = path.join(PKG_ROOT, `templates/examples/${example}`);
|
||||
|
||||
if (example === "ai" && context.backend === "next" && serverAppDirExists) {
|
||||
const aiNextServerSrc = path.join(exampleBaseDir, "server/next");
|
||||
|
||||
if (await fs.pathExists(aiNextServerSrc)) {
|
||||
await processAndCopyFiles(
|
||||
"**/*",
|
||||
aiNextServerSrc,
|
||||
serverAppDir,
|
||||
context,
|
||||
false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (serverAppDirExists) {
|
||||
const exampleServerSrc = path.join(exampleBaseDir, "server");
|
||||
if (await fs.pathExists(exampleServerSrc)) {
|
||||
|
||||
@@ -353,8 +353,6 @@ function processAndValidateFlags(
|
||||
);
|
||||
if (config.backend !== "convex" && options.examples.includes("none")) {
|
||||
config.examples = [];
|
||||
} else {
|
||||
config.examples = ["todo"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user