fix(init): exclude template README, keep DEVELOPMENT.md, create skeleton docs/readme
Some checks are pending
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / deploy-dev (push) Blocked by required conditions
CI / deploy-prod (push) Blocked by required conditions

This commit is contained in:
nxtkofi 2026-05-17 20:06:33 +02:00
parent aab08d5e0f
commit 324aa32f6c

View file

@ -10,14 +10,13 @@ const EXCLUDE = [
'node_modules',
'.next',
'.sisyphus',
'.sisyphus',
'.memsearch',
'.playwright-mcp',
'pnpm-lock.yaml',
'bin',
'features.md',
'.env.local',
'DEVELOPMENT.md',
'README.md',
'tmuxi.template.yml',
];
@ -82,13 +81,12 @@ function main() {
// Copy template files into <name>/src/
copyRecursive(templateDir, srcDir, replacements);
// Move README.md to docs/readme.md
const readmeSrc = path.join(srcDir, 'README.md');
const readmeDest = path.join(docsDir, 'readme.md');
if (fs.existsSync(readmeSrc)) {
// Create empty docs/readme.md for the new project
fs.mkdirSync(docsDir, { recursive: true });
fs.renameSync(readmeSrc, readmeDest);
}
fs.writeFileSync(
path.join(docsDir, 'readme.md'),
`# ${projectName}\n\nProject documentation goes here.\n`
);
console.log('Initializing git...');
execSync('git init', { cwd: targetDir, stdio: 'inherit' });