mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Docs with lazy loading using rc bundles
This commit is contained in:
parent
7881d1e457
commit
957e64fe8a
@ -50,8 +50,8 @@
|
||||
<div id="app"></div>
|
||||
<script type="module">
|
||||
// import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.esm.min.mjs';
|
||||
// import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9.2.0-rc6/dist/mermaid.esm.min.mjs';
|
||||
import mermaid from 'http://localhost:9000/mermaid.esm.mjs';
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9.2.0-rc6/dist/mermaid.esm.min.mjs';
|
||||
// import mermaid from 'http://localhost:9000/mermaid.esm.mjs';
|
||||
console.log(mermaid); // eslint-disable-line
|
||||
window.mermaid = mermaid;
|
||||
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
@ -61,8 +61,8 @@
|
||||
startOnLoad: true,
|
||||
themeCSS: '.label { font-family: Source Sans Pro,Helvetica Neue,Arial,sans-serif; }',
|
||||
lazyLoadedDiagrams: [
|
||||
// 'https://cdn.jsdelivr.net/npm/mermaid@9.2.0-rc5/dist/mermaid.esm.min.mjs',
|
||||
'http://localhost:9000/mermaid-mindmap-detector.esm.mjs',
|
||||
'https://cdn.jsdelivr.net/npm/@mermaid-js/mermaid-mindmap@9.2.0-rc3/dist/mermaid-mindmap-detector.esm.mjs',
|
||||
// 'http://localhost:9000/mermaid-mindmap-detector.esm.mjs',
|
||||
],
|
||||
};
|
||||
if (isDarkMode) conf.theme = 'dark';
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mermaid",
|
||||
"version": "9.2.0-rc2",
|
||||
"version": "9.2.0-rc6",
|
||||
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
|
||||
"main": "./dist/mermaid.core.mjs",
|
||||
"module": "./dist/mermaid.core.mjs",
|
||||
|
@ -50,8 +50,8 @@
|
||||
<div id="app"></div>
|
||||
<script type="module">
|
||||
// import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@<MERMAID_VERSION>/dist/mermaid.esm.min.mjs';
|
||||
// import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9.2.0-rc6/dist/mermaid.esm.min.mjs';
|
||||
import mermaid from 'http://localhost:9000/mermaid.esm.mjs';
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9.2.0-rc6/dist/mermaid.esm.min.mjs';
|
||||
// import mermaid from 'http://localhost:9000/mermaid.esm.mjs';
|
||||
console.log(mermaid); // eslint-disable-line
|
||||
window.mermaid = mermaid;
|
||||
const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
@ -61,8 +61,8 @@
|
||||
startOnLoad: true,
|
||||
themeCSS: '.label { font-family: Source Sans Pro,Helvetica Neue,Arial,sans-serif; }',
|
||||
lazyLoadedDiagrams: [
|
||||
// 'https://cdn.jsdelivr.net/npm/mermaid@9.2.0-rc5/dist/mermaid.esm.min.mjs',
|
||||
'http://localhost:9000/mermaid-mindmap-detector.esm.mjs',
|
||||
'https://cdn.jsdelivr.net/npm/@mermaid-js/mermaid-mindmap@9.2.0-rc3/dist/mermaid-mindmap-detector.esm.mjs',
|
||||
// 'http://localhost:9000/mermaid-mindmap-detector.esm.mjs',
|
||||
],
|
||||
};
|
||||
if (isDarkMode) conf.theme = 'dark';
|
||||
|
Loading…
x
Reference in New Issue
Block a user