This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,3 @@
(lang dune 3.8)
(using melange 0.1)

View file

@ -0,0 +1 @@
let buy_it = "buy " ^ Lib.A.it

View file

@ -0,0 +1,4 @@
(library
(name app)
(libraries lib)
(modes melange))

View file

@ -0,0 +1 @@
let () = Js.log App.B.buy_it

View file

@ -0,0 +1,8 @@
(melange.emit
(target output)
(modules c)
(libraries app)
(alias mel)
(emit_stdlib false)
(module_systems
(es6 mjs)))

View file

@ -0,0 +1,3 @@
(library
(name lib)
(modes melange))

View file

@ -0,0 +1,26 @@
Test the private libs flow when using `melange.emit` stanza
Cmj rules should include --bs-package-output
$ dune rules inside/app/.app.objs/melange/app.cmj |
> grep -e "--bs-package-output" --after-context=1
--bs-package-output
inside/app
Cmj rules should not include --bs-package-name
$ dune rules inside/app/.app.objs/melange/app.cmj |
> grep -ce "--bs-package-name"
0
[1]
$ output=inside/output
Js rules should include module type
$ dune rules $output/inside/app/b.mjs |
> grep -e "--bs-module-type" --after-context=1
--bs-module-type
es6
Build js files
$ dune build @mel
$ node _build/default/$output/inside/c.mjs
buy it