@mermaid-js/mermaid-cli 9.1.3 → 9.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/mermaid.min.js +1 -1
- package/package.json +24 -13
- package/src/cli.js +6 -0
- package/src/index.js +315 -0
- package/index.bundle.js +0 -336
package/README.md
CHANGED
|
@@ -99,6 +99,20 @@ the container to generate an SVG file as follows:
|
|
|
99
99
|
docker run -it -v /path/to/diagrams:/data minlag/mermaid-cli -i /data/diagram.mmd
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
+
## Use Node.JS API
|
|
103
|
+
|
|
104
|
+
It's possible to call `mermaid-cli` via a Node.JS API.
|
|
105
|
+
Please be aware that **the NodeJS API is not covered by semver**, as `mermaid-cli` follows
|
|
106
|
+
`mermaid`'s versioning.
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
import { run } from "@mermaid-js/mermaid-cli"
|
|
110
|
+
|
|
111
|
+
await run(
|
|
112
|
+
"input.mmd", "output.svg", // {optional options},
|
|
113
|
+
)
|
|
114
|
+
```
|
|
115
|
+
|
|
102
116
|
## Install locally
|
|
103
117
|
|
|
104
118
|
Some people are [having issues](https://github.com/mermaidjs/mermaid.cli/issues/15)
|