support including plugins via <script> instead of dependencies
This commit is contained in:
parent
34458a988a
commit
7b151c2320
2
dist/reveal.min.js
vendored
2
dist/reveal.min.js
vendored
File diff suppressed because one or more lines are too long
@ -45,7 +45,7 @@ window.Reveal.initialize = options => {
|
||||
* queuing up early API calls and invoking all of them
|
||||
* when Reveal.initialize is called.
|
||||
*/
|
||||
[ 'on', 'off', 'addEventListener', 'removeEventListener' ].forEach( method => {
|
||||
[ 'on', 'off', 'addEventListener', 'removeEventListener', 'registerPlugin' ].forEach( method => {
|
||||
window.Reveal[method] = ( ...args ) => {
|
||||
enqueuedAPICalls.push( deck => deck[method].call( null, ...args ) );
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ import {
|
||||
|
||||
/**
|
||||
* reveal.js
|
||||
* http://revealjs.com
|
||||
* https://revealjs.com
|
||||
* MIT licensed
|
||||
*
|
||||
* Copyright (C) 2020 Hakim El Hattab, https://hakim.se
|
||||
|
@ -163,20 +163,15 @@
|
||||
</div>
|
||||
|
||||
<script src="../../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
// Full list of configuration options available here:
|
||||
// https://github.com/hakimel/reveal.js#configuration
|
||||
Reveal.initialize({
|
||||
center: true,
|
||||
hash: true,
|
||||
|
||||
dependencies: [
|
||||
{ src: '../../plugin/highlight/highlight.js', async: true }
|
||||
{ src: '../../dist/plugin/highlight.js', async: true }
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
@ -30,11 +30,8 @@
|
||||
</div>
|
||||
|
||||
<script src="../../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
Reveal.initialize();
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
@ -40,13 +40,10 @@
|
||||
</div>
|
||||
|
||||
<script src="../../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
Reveal.initialize({
|
||||
transition: 'linear'
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
@ -176,9 +176,7 @@
|
||||
</div>
|
||||
|
||||
<script src="../../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
Reveal.initialize({
|
||||
history: true,
|
||||
transition: 'linear',
|
||||
@ -198,7 +196,6 @@
|
||||
{ src: '../../dist/plugin/math.js', async: true }
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
@ -40,10 +40,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../dist/reveal.min.js"></script>
|
||||
|
||||
<script type="module">
|
||||
|
||||
import Reveal from '../../js/reveal.js';
|
||||
import Markdown from '../../plugin/markdown/markdown.js';
|
||||
|
||||
let r1 = new Reveal( document.querySelector( '.deck1' ), {
|
||||
@ -55,7 +54,7 @@
|
||||
let r2 = new Reveal( document.querySelector( '.deck2' ), {
|
||||
embedded: true,
|
||||
keyboard: false,
|
||||
dependencies: [{plugin: Markdown}]
|
||||
dependencies: [ Markdown ]
|
||||
} );
|
||||
r2.initialize();
|
||||
|
||||
|
@ -123,14 +123,12 @@
|
||||
</div>
|
||||
|
||||
<script src="../../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
// Full list of configuration options available here:
|
||||
// https://github.com/hakimel/reveal.js#configuration
|
||||
Reveal.initialize({
|
||||
center: true,
|
||||
// rtl: true,
|
||||
|
||||
transition: 'linear',
|
||||
// transitionSpeed: 'slow',
|
||||
|
@ -82,9 +82,7 @@
|
||||
</div>
|
||||
|
||||
<script src="../../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
Reveal.initialize({
|
||||
center: true,
|
||||
history: true,
|
||||
@ -93,7 +91,6 @@
|
||||
// transitionSpeed: 'slow',
|
||||
// backgroundTransition: 'slide'
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
Loading…
Reference in New Issue
Block a user