summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile6
-rw-r--r--README.adoc2
-rw-r--r--lib/asciidoctor/interdoc_reftext/resolver.rb11
-rw-r--r--package.json4
4 files changed, 8 insertions, 15 deletions
diff --git a/Gemfile b/Gemfile
index ea42769..3f76764 100644
--- a/Gemfile
+++ b/Gemfile
@@ -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"
}
}