feat: add application productivity foundations
Quality / quality (ubuntu-latest) (push) Failing after 22s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
Clintchiz committed 2026-08-23 11:13:03 +05:30
1 parent 46195462c3
commit 64ab20cc95
42 files changed
+1533 -40

No files matched your search

+16 -2
View File
@@ -7,6 +7,7 @@
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
import { dirname, join, resolve } from "node:path";
import { runAdd } from "./add.ts";
import { AI_GUIDE, CLAUDE_MD } from "./ai-guide.ts";
import { currentCliVersion } from "./update-notifier.ts";
@@ -672,13 +673,26 @@ export function scaffoldApp(root: string, appName: string): void {
}
}
export function createApp(name: string): void {
export function createApp(name: string, options: readonly string[] = []): void {
if (!name) {
console.error("Usage: wrnexus create <app-name>");
process.exit(1);
}
scaffoldApp(resolve(process.cwd(), name), name);
const root = resolve(process.cwd(), name);
scaffoldApp(root, name);
const preset = options.find((value) => value.startsWith("--preset="))?.split("=")[1];
const requested =
options
.find((value) => value.startsWith("--features="))
?.split("=")[1]
?.split(",") ?? [];
const features = new Set([
...(preset === "saas" ? ["queue", "mail", "seed", "testing"] : []),
...(preset === "email" ? ["queue", "mail", "testing"] : []),
...requested,
]);
for (const feature of features) runAdd(root, feature);
console.log(`✓ Created ${name}`);
console.log(`\nNext steps:`);