docs: lead Strategy with autonomous SDLC cycle
Build and publish Eldorado documentation / build (pull_request) Successful in 51s
Build and publish Eldorado documentation / build (pull_request) Successful in 51s
This commit is contained in:
1 parent
e95b85afee
commit
29beebb379
14 files changed
+184
-333
No files matched your search
@@ -4,6 +4,7 @@ import {execFileSync} from 'node:child_process';
|
||||
const cli = 'vendor/archify/bin/archify.mjs';
|
||||
const types = new Set(['architecture','workflow','sequence','dataflow','lifecycle']);
|
||||
const inlineStyles = readFileSync(new URL('./inline-viewer.css', import.meta.url), 'utf8');
|
||||
const cycleStyles = readFileSync(new URL('./cycle-viewer.css', import.meta.url), 'utf8');
|
||||
const themeBridge = readFileSync(new URL('./viewer-theme-bridge.js', import.meta.url), 'utf8');
|
||||
// This directory is generated-only and ignored by Git. Remove stale artifacts.
|
||||
rmSync('static/diagrams', {recursive: true, force: true});
|
||||
@@ -36,7 +37,8 @@ for (const file of readdirSync('diagrams').sort()) {
|
||||
if (start < 0 || end < start || preset.split(guard).length !== 3) throw new Error('Archify preset integration drift');
|
||||
viewer = viewer.slice(0, start) + preset.replaceAll(guard, '') + viewer.slice(end);
|
||||
if (!viewer.includes('</head>') || !viewer.includes('</body>')) throw new Error(`Invalid viewer: ${output}`);
|
||||
writeFileSync(output, viewer.replace('</head>', `<style id="eldorado-inline-controls">${inlineStyles}</style></head>`)
|
||||
const storyStyles = ['strategy-target', 'strategy-target-mobile'].includes(name) ? cycleStyles : '';
|
||||
writeFileSync(output, viewer.replace('</head>', `<style id="eldorado-inline-controls">${inlineStyles}</style><style id="eldorado-cycle-labels">${storyStyles}</style></head>`)
|
||||
.replace('</body>', `<script>${themeBridge}</script></body>`));
|
||||
renameSync(`static/diagrams/${name}/index.delivery.json`, `.cache/archify/${name}.delivery.json`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user