Compile OCaml code to JavaScript with ocamlbuild and js_of_ocaml
-
Grunt
-
ocamlbuild
-
Findlib (ocamlfind)
-
js_of_ocaml
Install this plugin:
$ npm install grunt-of-ocamlbuild --save-dev
Include the task in your Gruntfile:
grunt.loadNpmTasks('grunt-of-ocamlbuild');
Run this task with the grunt jsofocamlbuild
command.
Type: String array
Additional options to be passed to ocamlbuild
.
Type: String array
Additional options to be passed to js_of_ocaml
.
jsofocamlbuild: {
main: {
files: {
'lib/': 'ocaml/main.ml'
},
options:
ocamlbuild: [],
js_of_ocaml: ['source-map']
},
},
This task supports all the file mapping format Grunt supports. Please read Globbing patterns and Building the files object dynamically for additional details.
##License
Copyright (c) 2017 Lemoine Automation Technologies
Licensed under the MIT license.