add todo, ai template for next

This commit is contained in:
Aman Varshney
2025-04-30 23:09:56 +05:30
parent 8f7601f319
commit 9e00e20880
6 changed files with 263 additions and 2 deletions

View File

@@ -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)) {

View File

@@ -353,8 +353,6 @@ function processAndValidateFlags(
);
if (config.backend !== "convex" && options.examples.includes("none")) {
config.examples = [];
} else {
config.examples = ["todo"];
}
}
}