Skip to content

Commit

Permalink
Merge pull request #285 from obilodeau/babel-updates
Browse files Browse the repository at this point in the history
Babel updates
  • Loading branch information
obilodeau authored Dec 4, 2019
2 parents d697bf4 + 863d3ef commit 20be338
Show file tree
Hide file tree
Showing 3 changed files with 2,341 additions and 1,877 deletions.
14 changes: 5 additions & 9 deletions test/js-babel/main.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import Asciidoctor from 'asciidoctor.js'
const asciidoctor = Asciidoctor()

// BEFORE SUPPORT
// 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'
import AsciidoctorReveal from 'asciidoctor-reveal.js'

// NOW SUPPORTED
import AsciidoctorRevealjs from 'asciidoctor-reveal.js'
AsciidoctorRevealjs.register()
const asciidoctor = Asciidoctor()
AsciidoctorReveal.register()

const attributes = { revealjsdir: 'node_modules/reveal.js@' }
const options = {
safe: 'safe',
backend: 'revealjs',
attributes: attributes,
header_footer: true
}

Expand Down
Loading

0 comments on commit 20be338

Please sign in to comment.