0.4.4 • Published 3 years ago
watches v0.4.4
API
watch(source, options)
watch(['src','static'], {
cache: require.cache, // to automatically clear require.cache on changes
ignore: /(^|[\/\\])[\._]./, //ignore files/folders with . or _ prefix
only: /\.js$/ // only files with a .js extension
}).on('ready', (all) => {
console.log("READY")
console.log(all)
}).on('change', (changed, all) => {
console.log("CHANGE")
console.log(changed)
console.log(changed.length + ' targets affected')
}).on('remove', (removed) => {
console.log("REMOVE")
console.log(removed)
}).on('error', (e) => {
console.log("ERROR")
console.log(e)
})
scan(source, options)
let files = scan(['src','static'], {
ignore: /(^|[\/\\])[\._]./, //ignore files/folders with . or _ prefix
only: /\.js$/ // only files with a .js extension
})
console.log(files) // all matching files
License
MIT © Marshall Brandt
0.4.4
3 years ago
0.4.1
3 years ago
0.4.3
3 years ago
0.4.2
3 years ago
0.3.0
3 years ago
0.4.0
3 years ago
0.2.5
3 years ago
0.2.4
3 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.2.3
3 years ago
0.2.2
3 years ago
0.0.10
3 years ago
0.1.0
3 years ago
0.0.9
3 years ago
0.0.8
3 years ago
0.0.7
3 years ago
0.0.6
3 years ago
0.0.3
3 years ago
0.0.5
3 years ago
0.0.4
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago