4.0.1 • Published 4 years ago

pon-task-watch v4.0.1

Weekly downloads
895
License
Apache-2.0
Repository
github
Last release
4 years ago

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

ParamtypeDescription
filenamesstring|string[]Filenames or glob pattern to watch
handlerfunctionChange handler function
optionsObjectOptional settings
options.delaynumberDelay to trigger watch
options.eventsstringTarget events

License

This software is released under the Apache-2.0 License.

Links

4.0.1

4 years ago

4.0.0

4 years ago

2.3.0

6 years ago

2.1.1

7 years ago

2.0.7

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago