How is this library implemented?
How to install and compile your project?
Don't forget to switch to a compiler >= 4.03.0.
opam switch 4.03.0
You can use opam by pinning the repository with
opam pin add ocaml-js-stdlib https://github.com/dannywillems/ocaml-js-stdlib.git
and to compile (in bytecode) your project, use (add js_of_ocaml package if you use it)
ocamlfind ocamlc -o [output_bytecode_file] -package gen_js_api -package ocaml-js-stdlib [...] -linkpkg [other arguments]
You can also manually compile. A Makefile is provided:
- make: generate the ml files from the interface, and compile mli in cmi and ml in cmo.
- make clean: remove ml, cmi and cmo files.
- make re: clean and execute make.
- make install: install the library under ocaml-js-stdlib.
- make remove: remove the library.
How to use it
Gen_js_api and some files need the compiler >= 4.03.0. See the gen_js_api repository for informations about compilation.
- js_dom.mli: binding to the DOM.
- jQuery.mli: bindings to jQuery.
- js_date.mli: bindings to the Date object.
The entire library structure must be defined.
We need to unify the styles used for the bindings: classes or private types ?
This library is under LGPL license.
- Danny Willems
- Lexifi SAS: Thanks for the initial js_dom.mli, jQuery.mli and js_core.mli files and
the license choice.
- Website: Lexifi