You are currently looking at the v6.0 - v8.2 docs (Reason v3.6 syntax edition). You can find the latest manual page here.
(These docs are equivalent to the old BuckleScript docs before the ReScript rebrand)
To install ReScript globally:
npm install -g bs-platform
Note: this starts a new project with the new syntax, not the old Reason syntax.
git clone https://github.com/rescript-lang/rescript-project-template cd rescript-project-template npm install npm run build node src/Demo.bs.js
During development, instead of running
npm run build each time to compile, use
npm run start to start a watcher that recompiles automatically after file changes.
You can install the toolchain locally to an existing JS project, through the familiar command:
npm install --save-dev bs-platform
The rest is the same as above. Since we output clean
.bs.js files, the rest of your existing toolchain (e.g. Babel and Webpack) should mostly just work. Nothing to learn on the bundling side!