diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-04-17 10:59:55 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2020-04-17 10:59:55 +0200 |
commit | 4f6bdf1420cc9e7bf971881c3af0606df6b31382 (patch) | |
tree | d3ae6bccd3ef7774cf0567c8734448d334506460 /js/index.js | |
parent | d9690462e0e3818a7741a8710bb721f4380009e1 (diff) | |
download | fosdem-2021-minimalism-presentation-4f6bdf1420cc9e7bf971881c3af0606df6b31382.tar fosdem-2021-minimalism-presentation-4f6bdf1420cc9e7bf971881c3af0606df6b31382.tar.gz |
two js bundles; reveal.js (es6) and reveal.es5.js, add source maps
Diffstat (limited to 'js/index.js')
-rw-r--r-- | js/index.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/js/index.js b/js/index.js index b261a1d..50e0647 100644 --- a/js/index.js +++ b/js/index.js @@ -1,4 +1,4 @@ -import Presentation from './reveal.js' +import Deck from './reveal.js' /** * Expose the Reveal class to the window. To create a @@ -10,7 +10,7 @@ import Presentation from './reveal.js' * // reveal.js is ready * }); */ -window.Reveal = Presentation; +var Reveal = Deck; /** @@ -27,15 +27,15 @@ window.Reveal = Presentation; let enqueuedAPICalls = []; -window.Reveal.initialize = options => { +Reveal.initialize = options => { // Create our singleton reveal.js instance - window.Reveal = new Presentation( document.querySelector( '.reveal' ), options ); + Object.assign( Reveal, new Deck( document.querySelector( '.reveal' ), options ) ); // Invoke any enqueued API calls - enqueuedAPICalls.map( method => method( window.Reveal ) ); + enqueuedAPICalls.map( method => method( Reveal ) ); - return window.Reveal.initialize(); + return Reveal.initialize(); } @@ -46,7 +46,9 @@ window.Reveal.initialize = options => { * when Reveal.initialize is called. */ [ 'on', 'off', 'addEventListener', 'removeEventListener', 'registerPlugin' ].forEach( method => { - window.Reveal[method] = ( ...args ) => { + Reveal[method] = ( ...args ) => { enqueuedAPICalls.push( deck => deck[method].call( null, ...args ) ); } -} );
\ No newline at end of file +} ); + +export default Reveal;
\ No newline at end of file |