Follow-up from "Add JS support"
The following discussion from !55 (merged) should be addressed:
-
@abate started a discussion: (+1 comment) A couple of comments :
Do you really need to publish all the
-gen
libraries ? are those needed for a developer that want to use this code ? I think these are more dune libraries and maybe it's not important to publish them.Also the jsoo_lib should be a dune library I think.
Reg the tests, you go full ocaml. However I think it's important to use mocha ( or similar ) to test this code. In this way we set the boundary between the ocaml and the js world there. In my mind it makes sense to go full JS for the tests, as this is this code is going to be used. We can keep the ocaml tests, but there should also be a mocha test there. This would also provide a more complte example how to use this code from js ( calling the functions ), and a reality check for us to check if everything is ok.
For the node/browser distinction, i think you should provide instead a small loader to do the magic for you. So will be able to use exactly the same code and run it via node or in a broswer. Once done that, you might also provide a small PoC that you can load in the browser to get a "hello world".