feat: Add documentation scripts for diagram exports and refresh process
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
"build": "tsc && vite build",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"preview": "vite preview",
|
||||
"deploy": "npm run build && gh-pages -d dist"
|
||||
"deploy": "npm run build && gh-pages -d dist",
|
||||
"diagram:png": "node scripts/export-architecture.mjs --format=png",
|
||||
"diagram:svg": "node scripts/export-architecture.mjs --format=svg",
|
||||
"docs:index": "node scripts/generate-doc-index.mjs",
|
||||
"docs:refresh": "npm run docs:index && npm run diagram:png"
|
||||
},
|
||||
"keywords": [
|
||||
"non-profit",
|
||||
|
||||
@@ -46,7 +46,17 @@ function build() {
|
||||
for (const cat of Object.keys(byCategory).sort()) {
|
||||
body += `### ${cat}\n` + byCategory[cat].map(f => `- ${f}`).join('\n') + '\n\n'
|
||||
}
|
||||
|
||||
// Append diagram export instructions (persistent section)
|
||||
body += '## Diagram Export\n'
|
||||
body += 'The architecture diagram source is `ArchitectureDiagram.mmd`. Export updated images using:\n\n'
|
||||
body += '```bash\n'
|
||||
body += 'npm run diagram:png\n'
|
||||
body += 'npm run diagram:svg\n'
|
||||
body += '```\n\n'
|
||||
body += 'Refresh docs index and PNG in one step:\n\n'
|
||||
body += '```bash\n'
|
||||
body += 'npm run docs:refresh\n'
|
||||
body += '```\n\n'
|
||||
body += '---\nLast regenerated: ' + new Date().toISOString() + '\n'
|
||||
writeFileSync(OUTPUT, body)
|
||||
console.log('docs/README.md regenerated.')
|
||||
|
||||
Reference in New Issue
Block a user