Remove CJS builds from docs

pull/4110/head
Sidharth Vinod 2023-02-19 00:58:36 +05:30
parent c1aad5975c
commit 45adc5fb6b
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
6 changed files with 10 additions and 18 deletions

View File

@ -135,7 +135,7 @@ b. The importing of mermaid library through the `mermaid.esm.js` or `mermaid.esm
```
**Notes**:
Rendering in Mermaid is initialized by `mermaid.initialize()` call. You can place `mermaid.initialize()` inside `mermaid.min.js` for brevity. However, doing the opposite lets you control when it starts looking for `<div>`tags inside the web page with `mermaid.initialize()`. This is useful when you think that not all `<div>` tags may have loaded on the execution of `mermaid.min.js` file.
Rendering in Mermaid is initialized by `mermaid.initialize()` call. You can place `mermaid.initialize()` inside `mermaid.esm.min.mjs` for brevity. However, doing the opposite lets you control when it starts looking for `<div>`tags inside the web page with `mermaid.initialize()`. This is useful when you think that not all `<div>` tags may have loaded on the execution of `mermaid.esm.min.mjs` file.
`startOnLoad` is one of the parameters that can be defined by `mermaid.initialize()`

View File

@ -262,7 +262,7 @@ You can still use the pre 9.4.0 method to add mermaid with mindmaps to a web pag
```html
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9.3.0/dist/mermaid.esm.min.mjs';
import mindmap from 'https://cdn.jsdelivr.net/npm/@mermaid-js/mermaid-mindmap@9.3.0/dist/mermaid-mindmap.esm.min.mjs';
await mermaid.registerExternalDiagrams([mindmap]);
</script>
@ -276,12 +276,6 @@ From version 9.4.0 you can simplify this code to:
</script>
```
or if you prefer not using the ESM package:
```html
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
```
Note that more complex integrations that use the **render** function directly need to use the **renderAsync** method instead in order to render mind maps.
You can also refer the implementation in the live editor [here](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done.

View File

@ -466,7 +466,9 @@ Timeline uses experimental lazy loading & async rendering features which could c
You can use this method to add mermaid including the timeline diagram to a web page:
```html
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
</script>
```
Note that more complex integrations that the **render** function directly need to use the **renderAsync** method instead in order to render timeline.

View File

@ -118,7 +118,7 @@ b. The importing of mermaid library through the `mermaid.esm.js` or `mermaid.esm
```
**Notes**:
Rendering in Mermaid is initialized by `mermaid.initialize()` call. You can place `mermaid.initialize()` inside `mermaid.min.js` for brevity. However, doing the opposite lets you control when it starts looking for `<div>`tags inside the web page with `mermaid.initialize()`. This is useful when you think that not all `<div>` tags may have loaded on the execution of `mermaid.min.js` file.
Rendering in Mermaid is initialized by `mermaid.initialize()` call. You can place `mermaid.initialize()` inside `mermaid.esm.min.mjs` for brevity. However, doing the opposite lets you control when it starts looking for `<div>`tags inside the web page with `mermaid.initialize()`. This is useful when you think that not all `<div>` tags may have loaded on the execution of `mermaid.esm.min.mjs` file.
`startOnLoad` is one of the parameters that can be defined by `mermaid.initialize()`

View File

@ -170,7 +170,7 @@ You can still use the pre 9.4.0 method to add mermaid with mindmaps to a web pag
```html
<script type="module">
import mermaid from '<CDN_URL>/mermaid@<MERMAID_VERSION>/dist/mermaid.esm.min.mjs';
import mermaid from '<CDN_URL>/mermaid@9.3.0/dist/mermaid.esm.min.mjs';
import mindmap from '<CDN_URL>/@mermaid-js/mermaid-mindmap@9.3.0/dist/mermaid-mindmap.esm.min.mjs';
await mermaid.registerExternalDiagrams([mindmap]);
</script>
@ -184,12 +184,6 @@ From version 9.4.0 you can simplify this code to:
</script>
```
or if you prefer not using the ESM package:
```html
<script src="<CDN_URL>/mermaid@<MERMAID_VERSION>/dist/mermaid.min.js"></script>
```
Note that more complex integrations that use the **render** function directly need to use the **renderAsync** method instead in order to render mind maps.
You can also refer the implementation in the live editor [here](https://github.com/mermaid-js/mermaid-live-editor/blob/develop/src/lib/util/mermaid.ts) to see how the async loading is done.

View File

@ -298,7 +298,9 @@ Timeline uses experimental lazy loading & async rendering features which could c
You can use this method to add mermaid including the timeline diagram to a web page:
```html
<script src="<CDN_URL>/mermaid@<MERMAID_VERSION>/dist/mermaid.min.js"></script>
<script type="module">
import mermaid from '<CDN_URL>/mermaid@<MERMAID_VERSION>/dist/mermaid.esm.min.mjs';
</script>
```
Note that more complex integrations that the **render** function directly need to use the **renderAsync** method instead in order to render timeline.