pon-task-watch

4.0.1 • Public • Published

pon-task-watch

Build Status npm Version JS Standard

Pon task to watch files

Installation

$ npm install pon-task-watch --save

Usage

'use strict'
 
const pon = require('pon')
const watch = require('pon-task-watch')
 
async function tryExample () {
  let run = pon({
    myWatch: watch('src/**/*.txt', (event, filename) => {
      console.log('File changed', filename)
    })
  })
 
  run('myWatch')
}
 
tryExample()
 

Signatures

define(filenames, handler, options) -> function

Define task

Param type Description
filenames string|string[] Filenames or glob pattern to watch
handler function Change handler function
options Object Optional settings
options.delay number Delay to trigger watch
options.events string Target events

License

This software is released under the Apache-2.0 License.

Links

Readme

Keywords

Package Sidebar

Install

npm i pon-task-watch

Weekly Downloads

11

Version

4.0.1

License

Apache-2.0

Unpacked Size

35.5 kB

Total Files

27

Last publish

Collaborators

  • realglobe