jigs_map/lib.rs
1#![warn(missing_docs)]
2//! HTML and Mermaid map generators for `jigs` pipelines.
3//!
4//! Both renderers accept an iterator of `JigMeta` references, typically
5//! produced by the `jigs!` macro's generated `all_jigs()` function. The
6//! entry point is inferred from the first jig in the iterator. Call from
7//! any binary in a crate that defines (or imports) the jigs you want
8//! mapped.
9//!
10//! ```ignore
11//! fn main() -> std::io::Result<()> {
12//! let dir = env!("CARGO_MANIFEST_DIR");
13//! std::fs::write(format!("{dir}/map.html"),
14//! jigs_map::to_html(jigs::all_jigs(), "my service", None))?;
15//! std::fs::write(format!("{dir}/map.md"),
16//! jigs_map::to_markdown(jigs::all_jigs(), "my service"))?;
17//! Ok(())
18//! }
19//! ```
20
21pub mod html;
22pub mod mermaid;
23
24pub use html::to_html;
25pub use mermaid::{to_markdown, to_mermaid};