Skip to content

Commit

Permalink
Merge pull request #2 from Mogztter/babel-7
Browse files Browse the repository at this point in the history
Upgrade to Babel 7 and run npm audit fix
  • Loading branch information
ggrossetie authored Dec 4, 2019
2 parents 578e5b4 + 231af2c commit 0e03ab5
Show file tree
Hide file tree
Showing 3 changed files with 2,371 additions and 1,843 deletions.
13 changes: 9 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ const asciidoctor = Asciidoctor()

// Babel will move the import statement at the top of the file.
// As a consequence, the reveal.js converter will be loaded before the initialization of Asciidoctor.js.
import 'asciidoctor-reveal.js'
// If we replace the import statement by a require statement then it's working.
// Another way to fix this issue is to lazily load the reveal.js converter.
//require('asciidoctor-reveal.js')
//import 'asciidoctor-reveal.js'

// To workaround this issue, we use replace the import statement by a require statement.
require('asciidoctor-reveal.js')

// Please note that asciidoctor-reveal.js 2.0.0 supports lazy loading.
// The following should work with asciidoctor-reveal.js 2.0+
//import AsciidoctorReveal from 'asciidoctor-reveal.js'
//AsciidoctorReveal.register()

const attributes = { revealjsdir: 'node_modules/reveal.js@' }
const options = {
Expand Down
Loading

0 comments on commit 0e03ab5

Please sign in to comment.