This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
We can use our local packages, in our documentation thanks to dune's mdx stanza:
|
||||
|
||||
```ocaml
|
||||
# #require "pkg.public-lib";;
|
||||
# Public_lib.x;;
|
||||
- : int = 0
|
||||
```
|
||||
|
||||
We can also use our local public executables:
|
||||
|
||||
```sh
|
||||
$ public-bin
|
||||
Hey!
|
||||
```
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(executable
|
||||
(name public_bin)
|
||||
(public_name public-bin)
|
||||
(modules public_bin))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let () = Printf.printf "Hey!\n"
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(mdx
|
||||
(files README.md)
|
||||
(packages pkg))
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(lang dune 2.4)
|
||||
(name pkg)
|
||||
|
||||
(using mdx 0.1)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(library
|
||||
(name public_lib)
|
||||
(public_name pkg.public-lib)
|
||||
(modules public_lib))
|
||||
|
|
@ -0,0 +1 @@
|
|||
let x = 0
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
You can make local packages available to mdx by using the `packages` field of
|
||||
the stanza
|
||||
|
||||
$ dune runtest
|
||||
Loading…
Add table
Add a link
Reference in a new issue