Skip to content

Commit

Permalink
Upgrade to Babel 7 and run npm audit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrossetie committed Dec 4, 2019
1 parent 578e5b4 commit 231af2c
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 231af2c

Please sign in to comment.