fix(init): exclude template README, keep DEVELOPMENT.md, create skeleton docs/readme
This commit is contained in:
parent
aab08d5e0f
commit
324aa32f6c
1 changed files with 7 additions and 9 deletions
|
|
@ -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' });
|
||||
|
|
|
|||
Loading…
Reference in a new issue