Download archify/scripts/render-examples.mjs from smlflg/archify-hai: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/smlflg/archify-hai/resolve/main/archify/scripts/render-examples.mjs
- Command line
-
hf download hf://smlflg/archify-hai/archify/scripts/render-examples.mjs
-
curl -L -o render-examples.mjs https://huggingface.co/smlflg/archify-hai/resolve/main/archify/scripts/render-examples.mjs
1.18 kB
| // Re-render every bundled example from its JSON IR. Installed skills keep HTML | |
| // beside the JSON examples; the development script passes the golden directory. | |
| import { execFileSync } from 'node:child_process'; | |
| import path from 'node:path'; | |
| import { fileURLToPath } from 'node:url'; | |
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | |
| const skillRoot = path.resolve(__dirname, '..'); | |
| const outputRoot = path.resolve(process.argv[2] || path.join(skillRoot, 'examples')); | |
| const TARGETS = [ | |
| ['workflow', 'agent-tool-call.workflow.json', 'workflow-agent-tool-call-rendered.html'], | |
| ['sequence', 'cache-miss-request.sequence.json', 'sequence-cache-miss-request.html'], | |
| ['dataflow', 'product-analytics.dataflow.json', 'dataflow-product-analytics.html'], | |
| ['lifecycle', 'agent-run.lifecycle.json', 'lifecycle-agent-run.html'], | |
| ['architecture', 'web-app.architecture.json', 'web-app-rendered.html'], | |
| ]; | |
| for (const [mode, input, output] of TARGETS) { | |
| execFileSync(process.execPath, [ | |
| path.join(skillRoot, `renderers/${mode}/render-${mode}.mjs`), | |
| path.join(skillRoot, 'examples', input), | |
| path.join(outputRoot, output), | |
| ], { stdio: 'inherit' }); | |
| } | |