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

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).
主站蜘蛛池模板: 郴州市| 定州市| 阿合奇县| 沅江市| 江津市| 永城市| 长乐市| 黄平县| 洪湖市| 丽水市| 门头沟区| 德安县| 清水河县| 济阳县| 呼图壁县| 天柱县| 高碑店市| 监利县| 扶余县| 乌苏市| 和平区| 临沧市| 溧阳市| 株洲县| 鹤岗市| 多伦县| 彰化市| 澄城县| 沁阳市| 苏尼特左旗| 嘉鱼县| 本溪| 德清县| 东至县| 西峡县| 康平县| 泾源县| 鸡泽县| 鄯善县| 阿荣旗| 望奎县|