Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

awatch

a-labo63MIT2.0.4

Async file watcher

watch

readme

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.