ontoref/justfiles/assets.just
Jesús Pérez da083fb9ec
Some checks failed
Nickel Type Check / Nickel Type Checking (push) Has been cancelled
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
.coder/m
2026-03-29 00:19:56 +00:00

32 lines
1.4 KiB
Plaintext

# Frontend asset management
#
# Vendored JS libs live in assets/vendor/ and are served by the daemon
# at /assets/vendor/<file>. Pin versions explicitly; bump manually.
#
# Pattern guide: reflection/templates/vendor-frontend-assets-prompt.md
CYTOSCAPE_NAVIGATOR_VERSION := "2.0.1"
# Export this daemon's API catalog to api-catalog.json.
# Run after any #[onto_api] annotation is added or changed.
# The file is read by the ontoref UI when this project is registered as a
# non-primary slug — consumer projects that run as separate binaries use this
# to expose their API surface in the ontoref UI.
[doc("Export #[onto_api] routes to api-catalog.json")]
export-api-catalog:
cargo run -p ontoref-daemon --no-default-features -- --dump-api-catalog > api-catalog.json
@echo "exported $(cat api-catalog.json | python3 -c 'import sys,json; print(len(json.load(sys.stdin)))') routes to api-catalog.json"
# Download/update all vendored frontend JS dependencies
[doc("Vendor all frontend JS dependencies")]
vendor-js: vendor-cytoscape-navigator
# cytoscape-navigator — minimap extension for Cytoscape.js
[doc("Vendor cytoscape-navigator (minimap)")]
vendor-cytoscape-navigator:
mkdir -p assets/vendor
curl -fsSL \
"https://cdn.jsdelivr.net/npm/cytoscape-navigator@{{CYTOSCAPE_NAVIGATOR_VERSION}}/cytoscape-navigator.js" \
-o assets/vendor/cytoscape-navigator.js
@echo "vendored cytoscape-navigator@{{CYTOSCAPE_NAVIGATOR_VERSION}}"