@farberg/reveal-template 1.1.12 → 1.1.13
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/docs/local-dev.html +3 -1
- package/init-reveal.js +9 -9
- package/package.json +1 -1
- package/plugins/reveal-plugin-mermaid.js +10 -2
package/docs/local-dev.html
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
|
+
<meta name="mobile-web-app-capable" content="yes" />
|
|
5
6
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
6
7
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
7
|
-
<meta name="viewport"
|
|
8
|
+
<meta name="viewport"
|
|
9
|
+
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes, minimal-ui">
|
|
8
10
|
|
|
9
11
|
<script type="module">
|
|
10
12
|
import { initReveal } from '../init-reveal.js'
|
package/init-reveal.js
CHANGED
|
@@ -35,7 +35,7 @@ const externalJsLibs = [
|
|
|
35
35
|
|
|
36
36
|
const extraStylesheets = [
|
|
37
37
|
{ href: 'node_modules/reveal.js/dist/reveal.css' },
|
|
38
|
-
{ href: 'node_modules/reveal.js/plugin/highlight/zenburn.css' },
|
|
38
|
+
{ href: 'node_modules/reveal.js/dist/plugin/highlight/zenburn.css' },
|
|
39
39
|
{ href: 'node_modules/asciinema-player/dist/bundle/asciinema-player.css' },
|
|
40
40
|
{ href: 'node_modules/reveal.js-plugins/customcontrols/style.css' },
|
|
41
41
|
{ href: 'node_modules/reveal.js-plugins/chalkboard/style.css' },
|
|
@@ -126,19 +126,19 @@ function windowOnLoadPromise() {
|
|
|
126
126
|
// Load reveal and its plugins
|
|
127
127
|
function loadRevealAndPlugins(options) {
|
|
128
128
|
const imports = [
|
|
129
|
-
"dist/reveal.
|
|
130
|
-
"plugin/markdown
|
|
131
|
-
"plugin/highlight
|
|
132
|
-
"plugin/search
|
|
133
|
-
"plugin/notes
|
|
134
|
-
"plugin/math
|
|
135
|
-
"plugin/zoom
|
|
129
|
+
"dist/reveal.mjs" /*must be the first one*/,
|
|
130
|
+
"dist/plugin/markdown.mjs",
|
|
131
|
+
"dist/plugin/highlight.mjs",
|
|
132
|
+
"dist/plugin/search.mjs",
|
|
133
|
+
"dist/plugin/notes.mjs",
|
|
134
|
+
"dist/plugin/math.mjs",
|
|
135
|
+
"dist/plugin/zoom.mjs"
|
|
136
136
|
]
|
|
137
137
|
|
|
138
138
|
if (options.verbose)
|
|
139
139
|
console.log("Importing the following plugins: ", imports)
|
|
140
140
|
|
|
141
|
-
return Promise.all(imports.map(i => import(options.revealPath +
|
|
141
|
+
return Promise.all(imports.map(i => import(options.revealPath + i)))
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
// Add js tags to the header and resolve
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
// When installed as an npm package the plugin lives at node_modules/@farberg/reveal-template/plugins/
|
|
2
|
+
// and mermaid is 3 levels up. When running from the template root directly it is 1 level up.
|
|
3
|
+
const mermaidUrl = new URL(
|
|
4
|
+
new URL(import.meta.url).pathname.includes('/node_modules/')
|
|
5
|
+
? '../../../mermaid/dist/mermaid.esm.min.mjs'
|
|
6
|
+
: '../node_modules/mermaid/dist/mermaid.esm.min.mjs',
|
|
7
|
+
import.meta.url
|
|
8
|
+
).href;
|
|
2
9
|
|
|
3
10
|
export default {
|
|
4
11
|
id: 'mermaid',
|
|
5
|
-
init: (deck) => {
|
|
12
|
+
init: async (deck) => {
|
|
13
|
+
const { default: mermaid } = await import(mermaidUrl);
|
|
6
14
|
mermaid.initialize({
|
|
7
15
|
'startOnLoad': false,
|
|
8
16
|
'theme': 'base',
|