1.0.1 • Published 6 years ago

the-watch v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

The Watch

📁 Minimalistic file watching

Install

$ npm install the-watch

Usage

const theWatch = require('the-watch');

theWatch('path', (err, event, path, details) => {
  if (err) throw err;

  // handle fs event
});

API

theWatch(path, options, cb)

path

Type: string

The path you want to watch - can be a file, a directory or an array of files or directories.

options

Type: object

Options for chokidar

cb

Type: function

Arguments: err, event, path, details

Will be called on every fs event

License

MIT © Tobias Herber