-
Notifications
You must be signed in to change notification settings - Fork 188
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
Converting the examples using javascript / node toolchain #149
Conversation
npm/builder.js
Outdated
callback => builder.compileExamples(callback), // Compile examples | ||
], () => { | ||
log.info(` | ||
In order to visualize the result, a local HTTP server must be started within the root of this project otherwise you will have cross-origin issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it applies in this context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
npm/builder.js
Outdated
}); | ||
}; | ||
|
||
Builder.prototype.compileExamples = function (callback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the naming is misleading since we are not really compiling examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Changed to convert.
const builder = new Builder(); | ||
|
||
log.task('examples'); | ||
builder.examples(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in #156 (comment) I think we should use an "examples" task to demonstrate how to use the converter in JavaScript.
In the Asciidoctor.js repository, I have one example with a textarea on the left of the page and the rendered Reveal.js presentation on the right of the page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand what you mean. We have it in the documentation already. Adding an example would mean maintaining two copies of the same code and instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I thought the purpose of the examples task was to provide a "live" example.
@@ -48,7 +50,7 @@ Builder.prototype.removeBuildDirSync = function () { | |||
Builder.prototype.compile = function (callback) { | |||
log.task('compile'); | |||
var opalCompiler = new OpalCompiler({dynamicRequireLevel: 'ignore'}); | |||
opalCompiler.compile('asciidoctor-revealjs', 'build/asciidoctor-revealjs.js', ['lib']); | |||
opalCompiler.compile('asciidoctor-revealjs', 'build/asciidoctor-reveal.js', ['lib']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are probably right the revealjs.js
is a bit too much 😉
3709920
to
32d271f
Compare
🎉 🎉 🎉 |
Just a start of javascript testing. People with javascript and npm experience please comment. I borrowed this from Asciidoctor.js and Asciidoctor-template.js.
Tests fail exactly where it should. Waiting on #143 to be fixed.