watch-traverse

A file watcher for all dependencies

Usage no npm install needed!

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

README

watch-traverse

Summary

This module lets you recursively watch files and its dependencies for change. It's a wrapper around fs.watchFile.

Installation

npm install --save watch-traverse

Usage

const path = require('path');
const watchFile = require('watch-traverse');
const resolved = path.resolve(__dirname, 'webpack.config.js');


watchFile(resolved, (contents) => {
    console.log("watching file has changed...")
});

Need help or want to donate to help me make Open Source projects?