INNER CODE UNIT · JavaScript
cli
mermaid-js/mermaid-cli · src/index.js:179
async function cli() {
const commander = new Command()
.version(version)
.description("Render a mermaid diagram definition into various formats")
.addOption(
new Option("-t, --theme <theme>", "Theme of the chart")
.choices(themes)
.default(undefined, "Mermaid default (depends on diagram type)"),
)
.addOption(
new Option(
"--size <size>",
[
"Size of the diagram.",
"This will attempt to create a PNG with a maximum height or width equal to the given size.",
"For `.svg`s, this will set the `max-width` attribute.",
"For `.pdf`s, this is in CSS px, which is 1/96 of an inch.",
].join("\n"),