npm.io
2.0.4 • Published 6 years ago

awatch

Licence
MIT
Version
2.0.4
Deps
3
Size
12 kB
Vulns
0
Weekly
0
Stars
1

awatch

Build Status npm Version JS Standard

Async file watcher

Installation

$ npm install awatch --save

Usage

'use strict'

const awatch = require('awatch')
const co = require('co')

co(function * () {

  let close = yield awatch('src/**/*.jsx', (event, filename) => {
    /* ... */
  })
  /* ... */
  process.on('beforeExit', () => {
    close()
  })
}).catch((err) => console.error(err))

License

This software is released under the MIT License.

Keywords