@farberg/reveal-template 1.0.53 → 1.0.55
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/init-reveal.js +4 -2
- package/package.json +1 -1
- package/plugins/reveal-plugin-asciinema.js +23 -17
- package/scripts/generate_pdfs.js +1 -1
package/init-reveal.js
CHANGED
|
@@ -27,13 +27,15 @@ const externalJsLibs = [
|
|
|
27
27
|
'node_modules/qrcode/build/qrcode.js',
|
|
28
28
|
'node_modules/file-saver/dist/FileSaver.min.js',
|
|
29
29
|
'node_modules/jszip/dist/jszip.min.js',
|
|
30
|
-
'node_modules/reveal.js-plugins/chalkboard/plugin.js'
|
|
30
|
+
'node_modules/reveal.js-plugins/chalkboard/plugin.js',
|
|
31
|
+
'node_modules/asciinema-player/dist/bundle/asciinema-player.min.js'
|
|
31
32
|
]
|
|
32
33
|
|
|
33
34
|
const extraStylesheets = [
|
|
34
35
|
{ href: 'node_modules/reveal.js/dist/reveal.css' },
|
|
35
36
|
{ href: 'node_modules/reveal.js/plugin/highlight/zenburn.css' },
|
|
36
|
-
{ href: 'node_modules/reveal.js-plugins/chalkboard/style.css' }
|
|
37
|
+
{ href: 'node_modules/reveal.js-plugins/chalkboard/style.css' },
|
|
38
|
+
{ href: 'node_modules/asciinema-player/dist/bundle/asciinema-player.css' }
|
|
37
39
|
]
|
|
38
40
|
|
|
39
41
|
const extraThemeCssStylesheets = [
|
package/package.json
CHANGED
|
@@ -6,23 +6,29 @@ export default () => {
|
|
|
6
6
|
init: (deck) => {
|
|
7
7
|
|
|
8
8
|
deck.on('ready', () => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
|
|
10
|
+
deck.addEventListener('slidechanged', function (event) {
|
|
11
|
+
|
|
12
|
+
// Workaround to get elements into an array before they are replaced
|
|
13
|
+
const els = []
|
|
14
|
+
for (let el of deck.getRevealElement().getElementsByTagName("asciinema")) {
|
|
15
|
+
els.push(el)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
for (let el of els) {
|
|
19
|
+
console.log("Looking @", el)
|
|
20
|
+
const source = el.getAttribute('src')
|
|
21
|
+
const conf = el.getAttribute('data-conf')
|
|
22
|
+
const div = document.createElement('div')
|
|
23
|
+
|
|
24
|
+
el.parentElement.replaceChild(div, el)
|
|
25
|
+
|
|
26
|
+
console.log("Playing", source, "with options", conf)
|
|
27
|
+
console.log(AsciinemaPlayer.create(source, div, JSON.parse(conf)));
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
|
|
26
32
|
})
|
|
27
33
|
|
|
28
34
|
}
|
package/scripts/generate_pdfs.js
CHANGED
|
@@ -6,7 +6,7 @@ const path = require('path');
|
|
|
6
6
|
const fs = require('fs');
|
|
7
7
|
const { spawn } = require('child_process');
|
|
8
8
|
const { combined_pdf, pdf_exists_and_is_newer_than_markdown } = require('./helpers')
|
|
9
|
-
const decktape_image = 'astefanutti/decktape:3.
|
|
9
|
+
const decktape_image = 'astefanutti/decktape:3.7'
|
|
10
10
|
|
|
11
11
|
const cwd = process.cwd()
|
|
12
12
|
const slides_dir = cwd
|