MCPcopy
hub / github.com/renatoasse/opensquad / writeProjectReadme

Function writeProjectReadme

src/init.js:159–171  ·  view source on GitHub ↗
(targetDir)

Source from the content-addressed store, hash-verified

157}
158
159async function writeProjectReadme(targetDir) {
160 const destPath = join(targetDir, 'README.md');
161 try {
162 await stat(destPath);
163 // README already exists — skip to avoid overwriting user content
164 return;
165 } catch {
166 // does not exist — write it
167 }
168 const readmePath = join(__dirname, 'readme', 'README.md');
169 const content = await readFile(readmePath, 'utf-8');
170 await writeFile(destPath, content, 'utf-8');
171}
172
173async function copyCommonTemplates(targetDir) {
174 const entries = await getTemplateEntries(TEMPLATES_DIR);

Callers 1

initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected