New Project
Once you've installed BuckleScript from the previous section, you can generate a lightweight project template:
bsb -init my-new-project
Alternatively, to start a new Reason project:
bsb -init my-new-project -theme basic-reason
To compile & run the project you just created:
cd my-new-project
npm run build
node src/Demo.bs.js
And that's it! You've just built the project once and ran the JS output. Feel free to inspect the js output, add a few files in my-new-project/src
, etc. Hopefully we've delivered on our promise of being a lean toolchain with clean output =).
We'll explain bsb
, the build system called by the above npm run build
, in a later section.
Editor Integration
We share the same editor integration as Reason. See the setup here then here.