-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(melange): add manifest information for
melange.emit
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
- Loading branch information
1 parent
3fc17ee
commit 54d234c
Showing
5 changed files
with
129 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Test melange manifest | ||
|
||
$ cat > dune-project <<EOF | ||
> (lang dune 3.8) | ||
> (using melange 0.1) | ||
> EOF | ||
|
||
$ cat > dune <<EOF | ||
> (melange.emit | ||
> (target output) | ||
> (emit_manifest true) | ||
> (modules main)) | ||
> EOF | ||
|
||
$ cat > main.ml <<EOF | ||
> Js.log "hello" | ||
> EOF | ||
|
||
$ dune build @melange | ||
Creating manifest rule | ||
dir: _build/default | ||
target_dir: _build/default/output | ||
mappings count: 1 | ||
manifest path: _build/default/output/melange-manifest.sexp | ||
manifest content: | ||
[{"_build/default/main.ml":["_build/default/output/main.js"]}] | ||
|
||
$ ls _build/default/output | ||
main.js | ||
melange-manifest.sexp | ||
node_modules | ||
|
||
$ cat _build/default/output/melange-manifest.sexp | ||
[{"_build/default/main.ml":["_build/default/output/main.js"]}] | ||
|
||
$ dune rules @melange | grep -C 3 "manifest" | ||
Creating manifest rule | ||
dir: _build/default | ||
target_dir: _build/default/output | ||
mappings count: 1 | ||
manifest path: _build/default/output/melange-manifest.sexp | ||
manifest content: | ||
[{"_build/default/main.ml":["_build/default/output/main.js"]}] | ||
|
||
((deps ()) | ||
(targets | ||
((files (_build/default/output/melange-manifest.sexp)) (directories ()))) | ||
(context default) | ||
(action | ||
(chdir | ||
_build/default | ||
(write-file | ||
output/melange-manifest.sexp | ||
"[{\"_build/default/main.ml\":[\"_build/default/output/main.js\"]}]")))) | ||
((deps |