Skip to content

Commit 6867053

Browse files
committed
docs: Update tiny docs
1 parent a92ae7a commit 6867053

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

docs/config/usage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,11 @@ Mermaid can load multiple diagrams, in the same page.
9898
> Try it out, save this code as HTML and load it using any browser.
9999
> (Except Internet Explorer, please don't use Internet Explorer.)
100100
101+
## Tiny Mermaid
102+
103+
We have a smaller version of mermaid that is almost half the size of the full library.
104+
If you need a leaner version without some additional features, you can use the [Mermaid Tiny](https://github.com/mermaid-js/mermaid/tree/develop/packages/tiny) library.
105+
101106
## Enabling Click Event and Tags in Nodes
102107

103108
A `securityLevel` configuration has to first be cleared. `securityLevel` sets the level of trust for the parsed diagrams and limits click functionality. This was introduced in version 8.2 as a security improvement, aimed at preventing malicious use.

docs/intro/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ To Deploy Mermaid:
354354

355355
- [Mermaid Live Editor](https://github.com/mermaid-js/mermaid-live-editor)
356356
- [Mermaid CLI](https://github.com/mermaid-js/mermaid-cli)
357+
- [Mermaid Tiny](https://github.com/mermaid-js/mermaid/tree/develop/packages/tiny)
357358
- [Mermaid Webpack Demo](https://github.com/mermaidjs/mermaid-webpack-demo)
358359
- [Mermaid Parcel Demo](https://github.com/mermaidjs/mermaid-parcel-demo)
359360

packages/mermaid/src/docs/config/usage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ Mermaid can load multiple diagrams, in the same page.
9292
> Try it out, save this code as HTML and load it using any browser.
9393
> (Except Internet Explorer, please don't use Internet Explorer.)
9494
95+
## Tiny Mermaid
96+
97+
We have a smaller version of mermaid that is almost half the size of the full library.
98+
If you need a leaner version without some additional features, you can use the [Mermaid Tiny](https://github.com/mermaid-js/mermaid/tree/develop/packages/tiny) library.
99+
95100
## Enabling Click Event and Tags in Nodes
96101

97102
A `securityLevel` configuration has to first be cleared. `securityLevel` sets the level of trust for the parsed diagrams and limits click functionality. This was introduced in version 8.2 as a security improvement, aimed at preventing malicious use.

packages/mermaid/src/docs/intro/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ To Deploy Mermaid:
109109

110110
- [Mermaid Live Editor](https://github.com/mermaid-js/mermaid-live-editor)
111111
- [Mermaid CLI](https://github.com/mermaid-js/mermaid-cli)
112+
- [Mermaid Tiny](https://github.com/mermaid-js/mermaid/tree/develop/packages/tiny)
112113
- [Mermaid Webpack Demo](https://github.com/mermaidjs/mermaid-webpack-demo)
113114
- [Mermaid Parcel Demo](https://github.com/mermaidjs/mermaid-parcel-demo)
114115

packages/tiny/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
This is a tiny version of mermaid that is optimized for the web. It is a subset of the mermaid library and is designed to be used in the browser via CDN.
44

5-
## Usage via NPM
5+
## Lazy loading
66

7-
This package is not meant to be installed directly from npm. It is designed to be used via CDN.
8-
If you need to use mermaid in your project, please install the full [`mermaid` package](https://www.npmjs.com/package/mermaid) instead.
7+
The original mermaid library supports lazy loading, so it will be faster on the initial load, and only load the required diagrams.
8+
This is not supported in the tiny mermaid library. So it's always recommended to use the full mermaid library unless you have a very specific reason to reduce the bundle size.
99

1010
## Removals from mermaid
1111

@@ -14,6 +14,12 @@ This does not support
1414
- Mindmap Diagram
1515
- Architecture Diagram
1616
- Katex rendering
17+
- Lazy loading
18+
19+
## Usage via NPM
20+
21+
This package is not meant to be installed directly from npm. It is designed to be used via CDN.
22+
If you need to use mermaid in your project, please install the full [`mermaid` package](https://www.npmjs.com/package/mermaid) instead.
1723

1824
## Usage via CDN
1925

0 commit comments

Comments
 (0)