官术网_书友最值得收藏!

Getting started with ReasonML

The Reason website has a great quickstart guide as well as tutorials for setting up editor support. First, install NodeJS to get the node package manager (npm). Then, run the following:

npm install -g bs-platform
cd <your-projects-folder>
bsb –init learning-tydd-reason –theme basic-reason
cd learning-tydd-reason

Now we can do an initial compile with the following command:

bsb -make-world

The preceding command builds your entire project and its dependencies recursively. It will be almost instantaneous.

It's worth mentioning that we actually recommend running the preceding shell commands (substituting in your actual projects folder, of course), because throughout this book, we're going to arrange the code examples in the form of a single project, learning-tydd-reason, and the code examples that you type into the various given file names will fit together to make up that project.

You will almost certainly want to set up editor support in Reason so that you can get things like autocompletion and go to definition. The guides available on the ReasonML website (https://reasonml.github.io/docs/en/global-installation.html) are very helpful for this. Currently, Visual Studio Code (http://code.visualstudio.com/) is the best-supported editor; you will probably get the best results from using that.

If you are trying to decide on the install method, we would personally recommend the OPAM method ( OPAM is the abbreviation of  OCaml Package Manager).
主站蜘蛛池模板: 翁牛特旗| 山西省| 汝州市| 桓台县| 巴林右旗| 剑河县| 崇仁县| 格尔木市| 上饶县| 高州市| 吐鲁番市| 都安| 准格尔旗| 壤塘县| 岳普湖县| 正镶白旗| 浦东新区| 宣城市| 长汀县| 青岛市| 吉安县| 西平县| 仲巴县| 开远市| 札达县| 昭觉县| 哈密市| 绥江县| 云安县| 郑州市| 芜湖市| 棋牌| 丹巴县| 吉安市| 饶阳县| 秦安县| 政和县| 定日县| 新余市| 于田县| 云和县|