1.3.4 • Published 2 years ago

lzy-watchpack v1.3.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

一个用于监控文件变化的包

const { DirectoryWatcher } = require('lzy-watchpack')

const wp = new DirectoryWatcher({ directoryList: dirPath, //传入需要监听的文件夹(绝对路径) poll: 3000 //扫描间隔时间 })

// 定义文件change remove create时的回调
wp.on('change', (path) => { console.log(path, 'change'); }) wp.on('remove', (path) => { console.log(path, 'remove'); }) wp.on('create', (path) => { console.log(path, 'create'); })

// 开/关监听器 wp.watch() wp.stopWatch()

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.0.5

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0

2 years ago