Cross-platform bash utilities - primed for Reason/OCaml
cygwin environment, ready to use for OCaml/OPAM, that we use to run a bash shell.
npm install
`
Installation on Windows does the following:
- Downloads cygwin into a .cygwin folder
- Installs various utilities required on cygwin for OCaml & Reason - rsync, patch, mingw, etc.
- Sets up OPAM to point to the Windows repository: https://github.com/fdopen/opam-repository-mingw/
Usage
$3
The __esy-bash__ command runs a script in a bash shell. On Linux and OS X, this just uses the default bash shell. On Windows, this delegates to the installed cygwin environment:
`
esy-bash echo 'HI'
`
$3
An API is also bundled:
`
const { bashExec } = require("esy-bash")
await bashExec("ls -a")
``