kc-watch

[nodejs] Watch file changes.

Usage no npm install needed!

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

README

Watch

[nodejs] Watch file changes.

Install

npm install kc-watch

Use

var watch = require('kc-watch');
watch('.', function(d, f, e){
    if (f.match(/\.js$/)) {
        console.log(d, f, e);
    }
});