(function() { function extend( a, b ) { for(var i in b) { a[i] = b[i]; } } var baseOptions = { transition: '<%= config.transition %>', dependencies: [ { src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } }, { src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }, { src: 'plugin/highlight/highlight.js', async: true, condition: function() { return !!document.querySelector( 'pre code' ); }, callback: function() { hljs.initHighlightingOnLoad(); } }, { src: 'plugin/zoom-js/zoom.js', async: true }, { src: 'plugin/notes/notes.js', async: true } ] }; <% plugin_files.each do |plugin| %> baseOptions.dependencies.push({ src: '<%= plugin %>', async: true }); <% end %> var configOptions = <%= config.revealjs_config.to_json %> var initializeOptions = {}; extend(initializeOptions, baseOptions); extend(initializeOptions, configOptions); Reveal.initialize(initializeOptions); })();