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

Workflow

To get the most from this chapter, we will set up a comfortable edit-compile workflow. We recommend placing two windows side-by-side in your editor. VSCode supports this functionality with the View | Split Editor command. On one side, load a Reason source file; on the other side, load the JavaScript output file (once it is initially compiled). Then in a terminal, run the following command:

bsb -w

The preceding command starts a build in watch mode, which automatically recompiles any parts of a project that are affected whenever you change any source code. In fact, watch mode is smart enough to also remove an outdated JavaScript output file whenever its corresponding Reason source file is deleted. The editor will also auto-reload the compiled JavaScript file whenever you save a Reason source file.

In VSCode, you can also open a terminal session directly below the files using the View | Integrated Terminal command and run bsb -w to get a single integrated view of your entire workflow. This way, when there are compile errors, you won't have to switch windows to see them. Of course, you may prefer to work with two monitors and keep the terminal and compiler running on another screen so you don't have to switch windows—that's feasible, too.

主站蜘蛛池模板: 威信县| 新巴尔虎右旗| 习水县| 凌源市| 玉田县| 靖边县| 巴彦县| 永昌县| 宽甸| 奉贤区| 沿河| 三亚市| 田东县| 绥宁县| 汉中市| 探索| 徐汇区| 新安县| 健康| 吉隆县| 聂荣县| 开封市| 随州市| 新乐市| 丹巴县| 固镇县| 永顺县| 广灵县| 临泽县| 会同县| 永年县| 福州市| 宁陕县| 巴彦县| 石阡县| 安康市| 叶城县| 防城港市| 泾阳县| 通道| 台湾省|