Watch a file for changes.
Provides a simplified wrapper around chokidar for watching a file.
Installation
yarn add watch-file-safe
npm install watch-file-safe
API
Usage
; ; watcher.onReady.onAdd.onChange.onRemove; // To stop watching:watcher.stop;
Types
; ; ;
- chokidar: A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.
- @bconnorwhite/bob: Bob is a toolkit for TypeScript projects
Related Packages
- fs-safe: A simple fs wrapper that doesn't throw
- watch-dir-safe: Watch a directory for changes
- read-file-safe: Read files without try catch
- write-file-safe: Write files, and parent directories if necessary
- remove-file-safe: Remove a file without try catch