This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,6 @@
|
|||
(lang dune 3.8)
|
||||
|
||||
(using melange 0.1)
|
||||
|
||||
(package
|
||||
(name pkg))
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
let buy_it = "buy " ^ Lib.A.it
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
val buy_it : string
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
(library
|
||||
(name app)
|
||||
(public_name pkg.app)
|
||||
(libraries lib)
|
||||
(modes melange))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let () = Js.log App.B.buy_it
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
(melange.emit
|
||||
(target output)
|
||||
(modules c)
|
||||
(alias mel)
|
||||
(emit_stdlib false)
|
||||
(libraries app))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let it = "it"
|
||||
|
|
@ -0,0 +1 @@
|
|||
val it : string
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(library
|
||||
(name lib)
|
||||
(public_name pkg.lib)
|
||||
(modes melange))
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
Test the public libs flow when using `melange.emit` stanza
|
||||
|
||||
Cmj rules should include --bs-package-output
|
||||
$ dune rules my_project/app/.app.objs/melange/app.cmj |
|
||||
> grep -e "--bs-package-output" --after-context=1
|
||||
--bs-package-output
|
||||
.
|
||||
|
||||
Cmj rules should include --bs-package-name
|
||||
$ dune rules my_project/app/.app.objs/melange/app.cmj |
|
||||
> grep -e "--bs-package-name" --after-context=1
|
||||
--bs-package-name
|
||||
pkg.app
|
||||
|
||||
$ output=my_project/output
|
||||
|
||||
Js rules should include --bs-module-type
|
||||
$ dune rules $output/node_modules/pkg.app/b.js |
|
||||
> grep -e "--bs-module-type" --after-context=1
|
||||
--bs-module-type
|
||||
commonjs
|
||||
|
||||
Js rules should include --bs-package-name
|
||||
$ dune rules $output/node_modules/pkg.app/b.js |
|
||||
> grep -e "--bs-package-name" --after-context=1
|
||||
--bs-package-name
|
||||
pkg
|
||||
|
||||
Build js files
|
||||
$ dune build @mel
|
||||
|
||||
Path to app_B is non-relative (broken)
|
||||
$ node _build/default/$output/my_project/c.js
|
||||
buy it
|
||||
|
||||
$ dune clean
|
||||
$ dune build @all
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue