@mermaid-js/mermaid-cli 9.1.7 → 9.3.0
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 +40 -20
- package/{fontawesome/webfonts/fa-brands-400.svg → dist/assets/fa-brands-400-ce2af7e2.svg} +0 -0
- package/{fontawesome/webfonts/fa-regular-400.svg → dist/assets/fa-regular-400-e519b693.svg} +0 -0
- package/{fontawesome/webfonts/fa-solid-900.svg → dist/assets/fa-solid-900-3e918c25.svg} +0 -0
- package/dist/index.html +1402 -0
- package/package.json +12 -11
- package/src/index.js +50 -23
- package/fontawesome/css/fa-brands.css +0 -9
- package/fontawesome/css/fa-regular.css +0 -10
- package/fontawesome/css/fa-solid.css +0 -11
- package/fontawesome/css/fontawesome.css +0 -3173
- package/fontawesome/webfonts/fa-brands-400.eot +0 -0
- package/fontawesome/webfonts/fa-brands-400.ttf +0 -0
- package/fontawesome/webfonts/fa-brands-400.woff +0 -0
- package/fontawesome/webfonts/fa-brands-400.woff2 +0 -0
- package/fontawesome/webfonts/fa-regular-400.eot +0 -0
- package/fontawesome/webfonts/fa-regular-400.ttf +0 -0
- package/fontawesome/webfonts/fa-regular-400.woff +0 -0
- package/fontawesome/webfonts/fa-regular-400.woff2 +0 -0
- package/fontawesome/webfonts/fa-solid-900.eot +0 -0
- package/fontawesome/webfonts/fa-solid-900.ttf +0 -0
- package/fontawesome/webfonts/fa-solid-900.woff +0 -0
- package/fontawesome/webfonts/fa-solid-900.woff2 +0 -0
- package/index.html +0 -13
- package/mermaid.min.js +0 -3
package/README.md
CHANGED
|
@@ -1,20 +1,37 @@
|
|
|
1
1
|
# mermaid-cli
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@mermaid-js/mermaid-cli)
|
|
4
|
+
[](https://www.npmjs.com/package/@mermaid-js/mermaid-cli)
|
|
5
|
+
[](https://hub.docker.com/r/minlag/mermaid-cli)
|
|
6
|
+
[](https://github.com/mermaid-js/mermaid-cli/actions/workflows/compile-mermaid.yml)
|
|
7
|
+
[](https://percy.io/Mermaid/mermaid-cli)
|
|
8
|
+
[](https://join.slack.com/t/mermaid-talk/shared_invite/enQtNzc4NDIyNzk4OTAyLWVhYjQxOTI2OTg4YmE1ZmJkY2Y4MTU3ODliYmIwOTY3NDJlYjA0YjIyZTdkMDMyZTUwOGI0NjEzYmEwODcwOTE)
|
|
9
|
+
|
|
3
10
|
This is a command-line interface (CLI) for [mermaid](https://mermaid-js.github.io/). It takes a mermaid definition file as input and generates an svg/png/pdf file as output.
|
|
4
11
|
|
|
5
|
-
|
|
12
|
+
## Installation
|
|
6
13
|
|
|
7
|
-
|
|
14
|
+
```sh
|
|
15
|
+
npm install -g @mermaid-js/mermaid-cli
|
|
16
|
+
```
|
|
8
17
|
|
|
9
|
-
|
|
10
|
-
Yarn, NPM, global install, etc. Try these examples to get started quickly.
|
|
18
|
+
## Usage
|
|
11
19
|
|
|
12
|
-
|
|
20
|
+
Convert Mermaid mmd Diagram File To SVG
|
|
13
21
|
|
|
14
22
|
```sh
|
|
15
23
|
mmdc -i input.mmd -o output.svg
|
|
16
24
|
```
|
|
17
25
|
|
|
26
|
+
> **Note**
|
|
27
|
+
>
|
|
28
|
+
> See [Alternative installations](#alternative-installations) if you don't want to install the package globally.
|
|
29
|
+
>
|
|
30
|
+
> Locate how to call the mmdc executable for your preferred method
|
|
31
|
+
> i.e. Docker, Yarn, NPM, local install, etc.
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
18
35
|
### Create A PNG With A Dark Theme And Transparent Background
|
|
19
36
|
|
|
20
37
|
```sh
|
|
@@ -104,6 +121,8 @@ EOF
|
|
|
104
121
|
mmdc -h
|
|
105
122
|
```
|
|
106
123
|
|
|
124
|
+
# Alternative installations
|
|
125
|
+
|
|
107
126
|
## Use Docker:
|
|
108
127
|
|
|
109
128
|
```sh
|
|
@@ -112,7 +131,7 @@ docker pull minlag/mermaid-cli
|
|
|
112
131
|
|
|
113
132
|
or pull from Github Container Registry
|
|
114
133
|
|
|
115
|
-
```sh
|
|
134
|
+
```sh
|
|
116
135
|
docker pull ghcr.io/mermaid-js/mermaid-cli/mermaid-cli
|
|
117
136
|
```
|
|
118
137
|
|
|
@@ -127,7 +146,7 @@ diagram defined on your system in `/path/to/diagrams/diagram.mmd`, you can use
|
|
|
127
146
|
the container to generate an SVG file as follows:
|
|
128
147
|
|
|
129
148
|
```sh
|
|
130
|
-
docker run -
|
|
149
|
+
docker run --rm -u `id -u`:`id -g` -v /path/to/diagrams:/data minlag/mermaid-cli -i /data/diagram.mmd
|
|
131
150
|
```
|
|
132
151
|
|
|
133
152
|
## Use Node.JS API
|
|
@@ -161,19 +180,6 @@ npm install @mermaid-js/mermaid-cli
|
|
|
161
180
|
./node_modules/.bin/mmdc -h
|
|
162
181
|
```
|
|
163
182
|
|
|
164
|
-
## Install globally
|
|
165
|
-
|
|
166
|
-
❗️ We do **NOT** recommend installing it globally because both YARN and NPM
|
|
167
|
-
could fail to install a command-line tool globally properly due to weird
|
|
168
|
-
permission issues.
|
|
169
|
-
`yarn global add @mermaid-js/mermaid-cli` or `npm install -g @mermaid-js/mermaid-cli`
|
|
170
|
-
|
|
171
|
-
## Install with [brew](https://brew.sh)
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
brew install mermaid-cli
|
|
175
|
-
```
|
|
176
|
-
|
|
177
183
|
### Run with npx
|
|
178
184
|
|
|
179
185
|
[`npx`](https://www.npmjs.com/package/npx) is installed by default with NPM. It
|
|
@@ -181,10 +187,24 @@ downloads and runs commands at the same time. To use Mermaid CLI with npx, you
|
|
|
181
187
|
need to use the `-p` flag because the package name is different than the command
|
|
182
188
|
it installs (`mmdc`). `npx -p @mermaid-js/mermaid-cli mmdc -h`
|
|
183
189
|
|
|
190
|
+
|
|
191
|
+
## Install with [brew](https://brew.sh)
|
|
192
|
+
|
|
193
|
+
> **Warning**
|
|
194
|
+
>
|
|
195
|
+
> This method of installation is no longer supported.
|
|
196
|
+
> For more details, see the [discussion](https://github.com/mermaid-js/mermaid-cli/issues/288).
|
|
197
|
+
> An old version of mermaid-cli can be installed with brew.
|
|
198
|
+
> ```sh
|
|
199
|
+
> brew install mermaid-cli
|
|
200
|
+
> ```
|
|
201
|
+
|
|
202
|
+
|
|
184
203
|
## Known issues
|
|
185
204
|
|
|
186
205
|
1. [Linux sandbox issue](docs/linux-sandbox-issue.md)
|
|
187
206
|
2. [Docker permission denied issue](docs/docker-permission-denied.md)
|
|
207
|
+
3. [How to setup up mermaid to use already installed chromium?](docs/already-installed-chromium.md)
|
|
188
208
|
|
|
189
209
|
## For contributors
|
|
190
210
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|