@farberg/reveal-template 1.0.61 → 1.0.62

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.
Files changed (2) hide show
  1. package/init-reveal.js +19 -13
  2. package/package.json +1 -1
package/init-reveal.js CHANGED
@@ -198,23 +198,29 @@ export function initReveal(opts) {
198
198
  window.Reveal = Reveal
199
199
 
200
200
  //Add markdown doc to presentation
201
- addMarkdownSectionToPresentation(getDocumentToLoadOrRedirectToIndexDocument(options), options);
201
+ const doc = getDocumentToLoadOrRedirectToIndexDocument(options)
202
202
 
203
- //Initialize Reveal
204
- const finalOptions = Object.assign(defaultRevealOptions, options.revealOptions);
203
+ if (doc) {
204
+ addMarkdownSectionToPresentation(doc, options);
205
205
 
206
- //Add plugins
207
- finalOptions.plugins = [
208
- ...modules,
209
- ...defaultDennisPlugins,
210
- window.RevealChalkboard,
211
- ...finalOptions.plugins
212
- ]
206
+ //Initialize Reveal
207
+ const finalOptions = Object.assign(defaultRevealOptions, options.revealOptions);
213
208
 
214
- if (options.verbose)
215
- console.log("Invoking Reveal.initialize with options: ", finalOptions)
209
+ //Add plugins
210
+ finalOptions.plugins = [
211
+ ...modules,
212
+ ...defaultDennisPlugins,
213
+ window.RevealChalkboard,
214
+ ...finalOptions.plugins
215
+ ]
216
216
 
217
- Reveal.initialize(finalOptions);
217
+ if (options.verbose)
218
+ console.log("Invoking Reveal.initialize with options: ", finalOptions)
219
+
220
+ Reveal.initialize(finalOptions);
221
+ } else {
222
+ console.error("No document to load, aborting");
223
+ }
218
224
 
219
225
  }).catch(error => {
220
226
  console.error("Unable to load dependencies: ", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farberg/reveal-template",
3
- "version": "1.0.61",
3
+ "version": "1.0.62",
4
4
  "homepage": "https://github.com/pfisterer/reveal-template",
5
5
  "description": "Reveal.js template for Dennis' lectures",
6
6
  "main": "index.js",