Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Update the asciidoctor.js library #22

Closed
jmini opened this issue Jan 24, 2015 · 8 comments
Closed

Update the asciidoctor.js library #22

jmini opened this issue Jan 24, 2015 · 8 comments

Comments

@jmini
Copy link
Contributor

jmini commented Jan 24, 2015

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[].

@ggrossetie
Copy link
Member

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 😄

@jmini
Copy link
Contributor Author

jmini commented Jan 26, 2015

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
└─┬ [email protected]
  ├── [email protected] (git://github.com/anthonny/opal-npm-wrapper.git#b56048584b3cf2cfebeef78b0fff54690e12e684)
  └── [email protected]

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 ba05fcf (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.

@ggrossetie
Copy link
Member

Hi @jmini thanks for spending some time on this issue 👍

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 😄

jmini added a commit to jmini/asciidoctor-firefox-addon that referenced this issue Feb 4, 2015
@jmini
Copy link
Contributor Author

jmini commented Feb 4, 2015

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.

@ggrossetie
Copy link
Member

Perfect, thanks!

jmini added a commit to jmini/asciidoctor-firefox-addon that referenced this issue Feb 5, 2015
@ggrossetie
Copy link
Member

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: asciidoctor/asciidoctor.org#353

@jmini
Copy link
Contributor Author

jmini commented Feb 6, 2015

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...

@ggrossetie
Copy link
Member

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants