@ribbonflow/cli
v0.1.0
Published
Flow-collection build CLI — validates/normalizes/migrates a directory of *.flow.json through @ribbonflow/core, then emits a referenceable asset bundle and/or a hostable static gallery.
Readme
@ribbonflow/cli
ribbonflow build — turn a directory of .flow.json files into a deployable
flow collection. It validates, migrates, and normalizes every flow through
@ribbonflow/core's format layer (a shared front-end), then emits one
or both of:
--mode=bundle— a referenceable asset bundle:flows.js(an importable keyed map of normalized flows) plus a pre-wiredindex.jsthat mounts any flow by key overribbonflow.--mode=gallery— a self-contained static gallery: an index of every flow, each playable and iframe-embeddable at its own URL, all sharing one bundled, dependency-free renderer asset (assets/ribbonflow.mjs).
Usage
ribbonflow build <flowsDir> [--mode=bundle|gallery|both] [--out=<dir>]# Build both from the repo's example flows:
node bin/ribbonflow.js build ../examples --mode=both --out=./out
# → ./out/bundle/{flows.js,index.js} and ./out/gallery/{index.html, <flow>.html…}Defaults: --mode=both, --out=./dist-flows. Each .flow.json is keyed by its
path under <flowsDir> (single flows and flow-sets are auto-detected and
rendered through mountFlowAuto). Parse/validation failures are reported and
skipped, not fatal.
The gallery's renderer asset is bundled from ribbonflow with esbuild, so the
output is a static site you can drop on any host — no build step for the consumer.
