You need Opam, you can install it by following Opam's documentation.
With Opam installed, you can install the dependencies in a new local switch with:
make switchOr globally, with:
make depsThen, build the project with:
make buildAfter building the project, you can run the main binary that is produced.
make startYou can run the test compiled executable:
make testDocumentation for the libraries in the project can be generated with:
make doc
open-cli $(make doc-path)This assumes you have a command like open-cli installed on your system.
NOTE: On macOS, you can use the system command
open, for instanceopen $(make doc-path)
The following snippet describes NodeJS's repository structure.
.
├── bin/
| Source for node's binary. This links to the library defined in `lib/`.
│
├── lib/
| Source for NodeJS's library. Contains NodeJS's core functionnalities.
│
├── test/
| Unit tests and integration tests for NodeJS.
│
├── dune-project
| Dune file used to mark the root of the project and define project-wide parameters.
| For the documentation of the syntax, see https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
│
├── LICENSE
│
├── Makefile
| Make file containing common development command.
│
├── README.md
│
└── node.opam
Opam package definition.
To know more about creating and publishing opam packages, see https://opam.ocaml.org/doc/Packaging.html.