Closed jmini closed 9 years ago
Hi @jmini
If I am not wrong, asciidoctor-firefox-addon uses the version 1.5.0 of asciidoctor.js It seems to me that a newer version is available (at least 1.5.1, maybe 1.5.2).
You are correct!
Is it possible to publish a newer version of asciidoctor-firefox-addon relying on this newer version?
Yes sure, I will publish a new version on GitHub and http://asciidoctor.org/docs/editing-asciidoc-with-live-preview/
If you want you can submit a patch :smile:
It would be my pleasure to send you a pull request, but I hope that you can guide me (JavaScript is not my field of expertise).
I have installed asciidoctor.js with npm
:
npm install asciidoctor.js
When I display the list of installed modules(using npm list
), I see:
current repository
└─┬ asciidoctor.js@1.5.2
├── opal-npm-wrapper@0.1.1 (git://github.com/anthonny/opal-npm-wrapper.git#b56048584b3cf2cfebeef78b0fff54690e12e684)
└── xmlhttprequest@1.6.0
This seems to work well.
But now when I list the content of the asciidoctor.js plugin, I see:
ls /node_modules/asciidoctor.js/dist/npm
asciidoctor-core.gz.js
asciidoctor-core.js
asciidoctor-core.min.js
asciidoctor-docbook.gz.js
asciidoctor-docbook.js
asciidoctor-docbook.min.js
asciidoctor-extensions.gz.js
asciidoctor-extensions.js
asciidoctor-extensions.min.js
I comparison asciidoctor-firefox-addon/data contains only asciidoctor.js
and not asciidoctor-core.js
, asciidoctor-docbook.js
and asciidoctor-extensions.js
.
What does this means?
When I look at ba05fcfc68259fe63cf71c142f0571208385b046 (Asciidoctor to 1.5.0-preview.7 & Opal to 0.6.2) two files were updated: data/asciidoctor.js
and data/opal.js
. Opal is a dependency. The update make sense. When I downloaded asciidoctor.js with npm
I also got this dependency.
I am not sure to see how the files are organized here. My idea was to copy what I got from the npm
download into this repository. I am not so sure that this was a good idea.
Another side question: to test my change, how can I upgrade the extension installed in my firefox to the version I have prepared locally in my git repo?
Thanks in advance for your help and advice.
Hi @jmini thanks for spending some time on this issue :+1:
The Firefox extension is using the bower package of Asciidoctor.js (frontend) because the extension is running inside the browser. The npm package of Asciidoctor.js is used in Node.js (backend) development.
You can use bower to download the latest version of Asciidctor.js bower install asciidoctor.js --save
.
The two files are:
bower_components/opal/opal/0.6.3/opal.js
bower_components/asciidoctor.js/dist/asciidoctor.js
Another side question: to test my change, how can I upgrade the extension installed in my firefox to the version I have prepared locally in my git repo?
You will need to build the extension from source. You can follow the installation guide from the README: https://github.com/asciidoctor/asciidoctor-firefox-addon#installation
Feel free to ask if you have any trouble, thanks again for taking care of this issue :smile:
This guide is usefull to install bower on Ubuntu: Installing Bower on Ubuntu 14.04 LTS
Then as you told:
bower install asciidoctor.js --save
And replacing the files:
cp bower_components/asciidoctor.js/dist/asciidoctor.js git/asciidoctor-firefox-addon/data/asciidoctor.js
cp bower_components/opal/opal/0.6.3/opal.js git/asciidoctor-firefox-addon/data/opal.js
cp bower_components/asciidoctor.js/dist/css/asciidoctor.css git/asciidoctor-firefox-addon/data/asciidoctor.css
The guide you linked to build the extension with the Firefox Add-on SDK is also good.
I will open a pull request. Thank you for your help.
Perfect, thanks!
You can install the latest version: https://github.com/asciidoctor/asciidoctor-firefox-addon/releases/tag/v0.3.0
I will also update the download link on the asciidoctor.org website: https://github.com/asciidoctor/asciidoctor.org/pull/353
Any idea how to update this page: https://addons.mozilla.org/fr/firefox/addon/asciidoctorjs-live-preview/
I was only able to post a review...
See #9 I've been waiting for 5 months to get version 0.2.3 published ! Thanks for your review, I hope this will speed up the process
If I am not wrong, asciidoctor-firefox-addon uses the version 1.5.0 of asciidoctor.js It seems to me that a newer version is available (at least 1.5.1, maybe 1.5.2). Is it possible to publish a newer version of asciidoctor-firefox-addon relying on this newer version?
I think an update will be the fix for the issue: #21 Unresolved directive in - include::../inc.adoc[] .