To install ReScript globally:
npm install -g bs-platform
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!