Cheat Sheet速查表
跳转到主要内容

Watchman 速查表

本文根据 Devhints / Watchman 翻译。代码示例及版本范围沿用原文。原文标注更新日期:2017-10-18。

入门

watchman watch ./src

将 ./src 添加到监视列表。

watchman -- trigger ./src retest '*.js' -- npm test

添加一个名为 retest 的触发器,用于在 npm test 每次 *.js 发生更改时执行 ./src.

监视

watchman watch ~/src
watchman watch-list
watchman watch-del ~/src

另请参阅