cross-platform file watching library.
It is now used in Microsoft’s Visual Studio Code, gulp, karma, PM2, browserify, webpack, BrowserSync, and many others. It has proven itself in production environments.
Version 3 is out! Check out our blog post about it: Chokidar 3: How to save 32TB of traffic every week
const chokidar = require('chokidar');
// One-liner for current directory
chokidar.watch('.').on('all', (event, path) => {
console.log(event, path);
});