Skip to content

Commit

Permalink
show how to run with npx
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkrolick authored and MindaugasLaganeckas committed Sep 4, 2020
1 parent babd88a commit fa35823
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ yarn global add @mermaid-js/mermaid-cli
npm install -g @mermaid-js/mermaid-cli
```

## Run with npx

[`npx`](https://www.npmjs.com/package/npx) is installed by default with NPM. It downloads and runs commands at the same time.

To use Mermaid CLI with npx, you need to use the `-p` flag because the package name is different than the command it installs (`mmdc`).

```
npx -p @mermaid-js/mermaid-cli mmdc -i input.mmd -o output.svg
```

## Examples

Expand Down

0 comments on commit fa35823

Please sign in to comment.