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