In this lesson we will setup the tooling to create and build a new project. We explore it's structure and add a new module.
[00:18] It allows us to create a new project, and ships with a couple of themes. We're going to choose the basic Reason theme.
[00:42] Going through all the possible options and configurations is probably best to be explained in a separate course. We're instead going to focus on getting our first output with this default configuration.
[00:53] This example comes with only one demo.re file. We delete it and create a main.re file instead. Inside the file, we get started with printing a Hello World. Now we run npm run build.
[01:20] BuckleScript ships with a JS library that has a couple of utilities like Log. Log is quite useful, as it allows us to print larger structures and debug them.
[01:30] As a next step, we have the module math.re with an add function. In main, we can use math then. If you build again and run main, you can see that using the math module worked out of the box.
[01:49] By the way in case you don't want to build manually all the time, you can use npm start, which will watch for file changes and compile accordingly. Now you're ready to get started with your first Reason project.