UNPKG

jirehgrp

Version:

Scaffold frontend apps from Jireh templates (Next.js, React+Vite, Vanilla, etc.)

25 lines (19 loc) 752 B
// src/writeReadme.ts import fs from "node:fs"; import path from "node:path"; export async function writeReadme(targetDir, options) { const { projectName, description = "A project created with jirehgrp-CLI", packageName = projectName, usage = "npm run dev", license = "MIT", includeGeneratedBy = true, } = options; const generatedByLine = includeGeneratedBy ? "\n> Generated with ❤️ using the jirehgrp-CLI." : ""; const content = `# ${projectName} ${description} --- **Package:** ${packageName} **Usage:** ${usage} **License:** ${license} --- ${generatedByLine} `; const outPath = path.join(targetDir, "README.md"); fs.writeFileSync(outPath, content, "utf-8"); console.log("✔️ README.md generated"); }