|
Hello,
currently I am developing the integration between asciidocotr.js with Nashorn. In this integration I have found two barriers, the first one is a bug on Nashorn, so in this case we cannot do anything rather than wait until a new update of JDK8 is released with the bug fixed by Nashorn team. The other barrier is the IO.
By default Nashorn does not provide an IO management, so we need a way to modify the javascript generated by Opal to allow us add some Java code for reading and writing files.
I think we must do something similar as it has been done for Node.js, first of all detect if we are running within Nashorn and if it is the case do the file management.
To detect if we code is being run inside Nashorn is as easy as:
try {
Java.type('java.lang.String');
} catch(err) {
return false;
}
So the question is if it is identified all the places where asciidoctor.js needs to access the filesystem and what is the experience when it was done for Node.js.
|