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

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).
主站蜘蛛池模板: 浪卡子县| 湖北省| 红原县| 八宿县| 宕昌县| 临汾市| 彰化市| 清涧县| 盐源县| 南岸区| 贵溪市| 广宗县| 班玛县| 阆中市| 潼南县| 宁海县| 连山| 石屏县| 花莲县| 荆州市| 乌鲁木齐市| 潜江市| 寿阳县| 富宁县| 滦南县| 丽水市| 云浮市| 惠水县| 东乌| 永靖县| 伽师县| 新乐市| 通化县| 伊通| 衡水市| 广丰县| 汝城县| 霞浦县| 宁阳县| 桓台县| 宁陵县|