Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have the ability to use asciidoctor-doctest from the JavaScript Asciidoctor ecosystem #13

Open
obilodeau opened this issue Aug 19, 2017 · 5 comments

Comments

@obilodeau
Copy link
Member

We are adding doctest support to asciidoctor-reveal.js and we are facing a problem where only our ruby-based slim templates will be testable using doctest and not our jade templates (used by AsciidocFX or anyone who prefers managing their slide decks with node/npm instead of ruby). Since reveal.js is a node/npm project it integrates well that way too.

It would be nice if we could use doctest from our asciidoctor-reveal.js plugin. This is an example of how it is used in the reveal.js context.

@obilodeau
Copy link
Member Author

This is not gonna happen and the reasoning is sound: asciidoctor/asciidoctor-reveal.js#116 (comment)

@ggrossetie
Copy link
Member

@jirutka @obilodeau I think this issue is still relevant no ?

Jakub was suggesting to be able to run a command line (ie. https://github.com/asciidoctor/asciidoctor-cli.js).

Currently AsciidocConverter is basically a wrapper around the Asciidoctor.convert Ruby API but we could configure this converter to run either the Ruby API or the JavaScript cli. Though this is not really extensible and I think a better solution should be to create multiple implementations:

  • Asciidoctor Ruby API converter (default)
  • Asciidoctor JavaScript cli converter (a specialized version of the command line converter) [optional]
  • Command line converter

Ideas ? Thoughts ?

@obilodeau
Copy link
Member Author

I thought that if we compiled the slim templates to Ruby and tested that with doctest in Ruby that it would suffice.

As I write this, I realize that this wouldn't catch regressions or issues introduced by Opal, Asciidoctor.js or our javascript build script.

@jirutka jirutka reopened this Aug 29, 2017
@jirutka
Copy link
Member

jirutka commented Aug 29, 2017

This is not gonna happen and the reasoning is sound…

Nope, it’s going to happen, i.e. DocTest will be able to run asciidoctor.js. This modularity was part of the refactoring effort, but it’s not done yet.

@ggrossetie
Copy link
Member

@jirutka Do you already have a working branch for this refactoring or can I give it a try ?

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

No branches or pull requests

3 participants