convert plugins to ES modules, transpile es5 versions backwards compatibility
This commit is contained in:
@ -195,7 +195,7 @@
|
||||
},
|
||||
|
||||
dependencies: [
|
||||
{ src: '../../plugin/math/math.js', async: true }
|
||||
{ src: '../../dist/plugin/math.js', async: true }
|
||||
]
|
||||
});
|
||||
|
||||
|
@ -17,7 +17,11 @@
|
||||
<div style="display: flex; flex-direction: row;">
|
||||
<div class="reveal deck1" style="width: 100%; height: 50vh; margin: 10px;">
|
||||
<div class="slides">
|
||||
<section>1.1</section>
|
||||
<section data-markdown>
|
||||
<script type="text/template">
|
||||
## Slide attributes
|
||||
</script>
|
||||
</section>
|
||||
<section>1.2</section>
|
||||
<section>1.3</section>
|
||||
</div>
|
||||
@ -25,7 +29,11 @@
|
||||
|
||||
<div class="reveal deck2" style="width: 100%; height: 50vh; margin: 10px;">
|
||||
<div class="slides">
|
||||
<section>2.1</section>
|
||||
<section data-markdown>
|
||||
<script type="text/template">
|
||||
## Slide attributes
|
||||
</script>
|
||||
</section>
|
||||
<section>2.2</section>
|
||||
<section>2.3</section>
|
||||
</div>
|
||||
@ -34,19 +42,24 @@
|
||||
|
||||
<script src="../../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
<script type="module">
|
||||
|
||||
import Markdown from '../../plugin/markdown/markdown.js';
|
||||
|
||||
let r1 = new Reveal( document.querySelector( '.deck1' ), {
|
||||
embedded: true,
|
||||
keyboard: false
|
||||
} );
|
||||
r1.initialize();
|
||||
r1.initialize().then( () => {
|
||||
|
||||
let r2 = new Reveal( document.querySelector( '.deck2' ), {
|
||||
embedded: true,
|
||||
keyboard: false,
|
||||
dependencies: [{plugin: Markdown}]
|
||||
} );
|
||||
r2.initialize();
|
||||
|
||||
let r2 = new Reveal( document.querySelector( '.deck2' ), {
|
||||
embedded: true,
|
||||
keyboard: false
|
||||
} );
|
||||
r2.initialize();
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -122,13 +122,12 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.min.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import '../js/index.js'
|
||||
import Markdown from '../plugin/markdown/markdown.js'
|
||||
|
||||
Reveal.initialize({
|
||||
dependencies: [
|
||||
{ src: '../plugin/markdown/marked.js' },
|
||||
{ src: '../plugin/markdown/markdown.js' },
|
||||
]
|
||||
dependencies: [ Markdown ]
|
||||
}).then( function() {
|
||||
|
||||
QUnit.module( 'Markdown' );
|
||||
|
@ -24,14 +24,12 @@
|
||||
</div>
|
||||
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
<script src="../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
<script type="module">
|
||||
import '../js/index.js'
|
||||
import Markdown from '../plugin/markdown/markdown.js'
|
||||
Reveal.initialize({
|
||||
dependencies: [
|
||||
{ src: '../plugin/markdown/marked.js' },
|
||||
{ src: '../plugin/markdown/markdown.js' },
|
||||
]
|
||||
dependencies: [ Markdown ]
|
||||
}).then( function() {
|
||||
|
||||
QUnit.module( 'Markdown' );
|
||||
|
@ -32,15 +32,13 @@
|
||||
</div>
|
||||
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
<script src="../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
<script type="module">
|
||||
import '../js/index.js'
|
||||
import Markdown from '../plugin/markdown/markdown.js'
|
||||
|
||||
Reveal.initialize({
|
||||
dependencies: [
|
||||
{ src: '../plugin/markdown/marked.js' },
|
||||
// Test loading JS files with query strings
|
||||
{ src: '../plugin/markdown/markdown.js?query=string' },
|
||||
],
|
||||
dependencies: [ Markdown ],
|
||||
markdown: {
|
||||
smartypants: true
|
||||
}
|
||||
@ -49,7 +47,7 @@
|
||||
QUnit.module( 'Markdown' );
|
||||
|
||||
QUnit.test( 'Options are set', function( assert ) {
|
||||
assert.strictEqual( marked.defaults.smartypants, true );
|
||||
assert.strictEqual( Reveal.getPlugin( 'markdown' ).marked.defaults.smartypants, true );
|
||||
});
|
||||
|
||||
QUnit.test( 'Smart quotes are activated', function( assert ) {
|
||||
|
@ -117,14 +117,13 @@
|
||||
</div>
|
||||
|
||||
<script src="qunit-2.5.0.js"></script>
|
||||
<script src="../dist/reveal.min.js"></script>
|
||||
|
||||
<script>
|
||||
<script type="module">
|
||||
import '../js/index.js'
|
||||
import Markdown from '../plugin/markdown/markdown.js'
|
||||
|
||||
Reveal.initialize({
|
||||
dependencies: [
|
||||
{ src: '../plugin/markdown/marked.js' },
|
||||
{ src: '../plugin/markdown/markdown.js' },
|
||||
]
|
||||
dependencies: [ Markdown ]
|
||||
}).then( function() {
|
||||
|
||||
QUnit.module( 'Markdown' );
|
||||
|
@ -41,13 +41,12 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="../dist/reveal.min.js"></script>
|
||||
<script>
|
||||
<script type="module">
|
||||
import '../js/index.js'
|
||||
import Markdown from '../plugin/markdown/markdown.js'
|
||||
|
||||
Reveal.initialize({
|
||||
dependencies: [
|
||||
{ src: '../plugin/markdown/marked.js' },
|
||||
{ src: '../plugin/markdown/markdown.js' },
|
||||
]
|
||||
dependencies: [ Markdown ]
|
||||
}).then( function() {
|
||||
|
||||
QUnit.module( 'Markdown' );
|
||||
|
Reference in New Issue
Block a user