esy provides a single command called
esy that can be invoked inside of any
directory containing a
package.json file. The typical workflow is to
into a directory that contains a
package.json file, and then perform
operations on that project.
esy commands in that directory,
esy creates and manages
isolated build environment for your package called a "sandbox".
Each sandbox, in each directory is isolated from every other sandbox.
Here are two example projects:
- hello-reason, an example Reason project which uses dune build system.
- hello-ocaml, an example OCaml project which uses dune build system.
npm install -g esy
If you had installed esy previously:
npm uninstall --global --update esy
Clone & initialize the project
Clone the project source code
git clone https://github.com/esy-ocaml/hello-reason.git cd hello-reason
Install project's dependencies source code and perform an initial build of the project's dependencies and of the project itself:
Run compiled executables
esy x COMMAND invocation to run project's built executable as if they are
esy x Hello.exe
Rebuild the project
Hack on project's source code and rebuild the project:
Other useful commands
It is possible to invoke any command from within the project's sandbox. For example build & run tests with:
esy make test
You can run any
COMMAND inside the project development environment by just
prefixing it with
To shell into the project's development environment:
For more options: