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

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.

主站蜘蛛池模板: 兴义市| 福建省| 中山市| 贡山| 临汾市| 云和县| 两当县| 达州市| 东兰县| 清镇市| 南皮县| 从化市| 外汇| 上栗县| 绵竹市| 紫云| 黎川县| 陆良县| 突泉县| 蕉岭县| 读书| 汾西县| 平远县| 玉溪市| 阿坝| 辉南县| 宁国市| 卢氏县| 监利县| 尉氏县| 玉溪市| 日喀则市| 沙田区| 珲春市| 许昌县| 仪陇县| 日照市| 泸西县| 天柱县| 南召县| 阳曲县|