docs: Add production deployment success documentation for Azure Static Web App docs: Create Quick Start guide for project setup and deployment instructions docs: Update README.md to include new documentation links and structure docs: Enhance User Manual with detailed portal access, roles, and AI assistance features scripts: Implement architecture diagram export script using Mermaid CLI scripts: Create script to auto-generate documentation index for easier navigation chore: Remove unused update-doc-index script
30 lines
1000 B
JavaScript
30 lines
1000 B
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Export Mermaid architecture diagram to PNG/SVG.
|
|
* Requires: @mermaid-js/mermaid-cli (mmdc)
|
|
* Usage:
|
|
* node scripts/export-architecture.mjs --format png
|
|
* node scripts/export-architecture.mjs --format svg
|
|
*/
|
|
import { execSync } from 'child_process'
|
|
import { existsSync } from 'fs'
|
|
import { join } from 'path'
|
|
|
|
const args = process.argv.slice(2)
|
|
const formatArg = args.find(a => a.startsWith('--format=')) || '--format=png'
|
|
const format = formatArg.split('=')[1]
|
|
const diagram = join(process.cwd(), 'docs', 'ArchitectureDiagram.mmd')
|
|
const outFile = join(process.cwd(), 'docs', `ArchitectureDiagram.${format}`)
|
|
|
|
if (!existsSync(diagram)) {
|
|
console.error('Diagram source not found:', diagram)
|
|
process.exit(1)
|
|
}
|
|
|
|
try {
|
|
execSync(`npx mmdc -i "${diagram}" -o "${outFile}"`, { stdio: 'inherit' })
|
|
console.log(`Exported diagram to ${outFile}`)
|
|
} catch (e) {
|
|
console.error('Mermaid export failed. Ensure @mermaid-js/mermaid-cli is installed.')
|
|
process.exit(1)
|
|
} |