rename features to addons

This commit is contained in:
Aman Varshney
2025-03-06 14:35:01 +05:30
parent 3dbe289758
commit 5b13b04a20
17 changed files with 75 additions and 81 deletions

View File

@@ -0,0 +1,38 @@
import { cancel, isCancel, multiselect } from "@clack/prompts";
import pc from "picocolors";
import type { ProjectAddons } from "../types";
export async function getAddonsChoice(
Addons?: ProjectAddons[],
): Promise<ProjectAddons[]> {
if (Addons !== undefined) return Addons;
const response = await multiselect<ProjectAddons>({
message: "Which Addons would you like to add?",
options: [
{
value: "docker",
label: "Docker setup",
hint: "Containerize your application",
},
{
value: "github-actions",
label: "GitHub Actions",
hint: "CI/CD workflows",
},
{
value: "SEO",
label: "Basic SEO setup",
hint: "Search engine optimization configuration",
},
],
required: false,
});
if (isCancel(response)) {
cancel(pc.red("Operation cancelled"));
process.exit(0);
}
return response;
}