-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdune
22 lines (18 loc) · 1017 Bytes
/
dune
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; `melange.emit` is a Dune stanza that will produce build rules to generate
; JavaScript files from sources using the Melange compiler
; https://dune.readthedocs.io/en/stable/melange.html#melange-emit
(melange.emit
; The `target` field is used by Dune to put all JavaScript artifacts in a specific folder inside `_build/default`
; This field `target` allows to have multiple `melange.emit` stanzas in the `dune` file
; if, for example, we want to produce ES6 and CommonJS output from the same sources.
(target output)
; Here's the list of dependencies of the stanza. In this case (being `melange.emit`),
; Dune will look into those dependencies and generate rules with JavaScript targets
; for the modules in those libraries as well.
; Caveat: the libraries need to be specified with `(modes melange)`.
(libraries melange-webapi)
; Uncomment the following to copy the generated JavaScript files inside the source tree
; (promote (until-clean))
(preprocess
(pps melange.ppx))
(module_systems es6))