diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2019-04-14 23:33:56 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2019-04-14 23:46:44 +0200 |
commit | d10acf6d84b18ed2ad0afbf6a68d67d395dc1d9a (patch) | |
tree | 54e165eef1235a383e8e54cbdfe0d3a23980982e | |
parent | 3e6a31e9b0d0d6ed4daa44e8d6be000bbf508f77 (diff) |
Update asciidoctor.js to 2.0.0
-rw-r--r-- | Gemfile | 6 | ||||
-rw-r--r-- | README.adoc | 2 | ||||
-rw-r--r-- | lib/asciidoctor/interdoc_reftext/resolver.rb | 11 | ||||
-rw-r--r-- | package.json | 4 |
4 files changed, 8 insertions, 15 deletions
@@ -10,8 +10,10 @@ unless ENV.fetch('ASCIIDOCTOR_VERSION', '').empty? end group :development do - # Keep in sync with version used for asciidoctor.js. - gem 'opal', '~> 0.11.0' + # Keep in sync with version used in opal-node-runtime <- asciidoctor.js. + # TODO: Maybe replace with JS version after + # https://github.com/Mogztter/opal-node-compiler/issues/6 is resolved. + gem 'opal', github: 'opal/opal', ref: 'd136ea8' end group :ci do diff --git a/README.adoc b/README.adoc index a2d294c..70a4ac9 100644 --- a/README.adoc +++ b/README.adoc @@ -108,7 +108,7 @@ IMPORTANT: Bundler automatically _requires_ all the specified gems. [source, js, subs="+attributes"] ---- // Load asciidoctor.js and {gem-name}. -const asciidoctor = require('asciidoctor.js')() +const asciidoctor = require('@asciidoctor/core')() const interdocReftextExt = require('{gem-name}') // See documentation at the end of this section. diff --git a/lib/asciidoctor/interdoc_reftext/resolver.rb b/lib/asciidoctor/interdoc_reftext/resolver.rb index cc32fd6..a5e6282 100644 --- a/lib/asciidoctor/interdoc_reftext/resolver.rb +++ b/lib/asciidoctor/interdoc_reftext/resolver.rb @@ -20,17 +20,8 @@ module Asciidoctor::InterdocReftext logger ||= if defined? ::Asciidoctor::LoggerManager ::Asciidoctor::LoggerManager.logger - elsif defined? ::Logger - ::Logger.new(STDERR) else - # Fake logger for Opal. - # TODO: Remove after update to Asciidoctor 1.5.7 or Opal with Logger. - Object.new.tap do |o| - # rubocop: disable MethodMissing - def o.method_missing(_, *args) - STDERR.puts(*args) - end - end + ::Logger.new(STDERR) end @document = document diff --git a/package.json b/package.json index a56e6e2..0dde9c4 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,9 @@ "prepublishOnly": "bundle install && bundle exec rake build:js" }, "devDependencies": { - "asciidoctor.js": "~1.5.6" + "@asciidoctor/core": "~2.0.0" }, "peerDependencies": { - "asciidoctor.js": "~1.5.6" + "@asciidoctor/core": "~2.0.0" } } |