fs-watch

修复各个平台中的fs.watch的限制

Usage no npm install needed!

<script type="module">
  import fsWatch from 'https://cdn.skypack.dev/fs-watch';
</script>

README

fs-watch

修复mac中的fs.watch的限制

原理

在watch不能使用的地方,用watchFile来替换

用法

var watch = require('../');

watch('./a.txt', function () {
  console.log('file is changed');
});