filespy
filespy copied to clipboard
Matching against root doesn't work on windows
Hi! Thanks for awesome lib, README#Pattern syntax has following example:
Use a leading separator to match against the root. '/*.js' // matches 'a.js' not 'a/b.js'
Does it use cwd as a root?
I'm trying to watch root package.json:
const spy = filespy(process.cwd(), {
only: ['/package.json'],
}).on('all', (event, path) => console.log(event, path))
console.log(spy.files) // no files being watched on win
This doesn't work on windows, but works on macOS.
filespy(process.cwd(), {
only: ['package.json'],
}).on('all', (event, path) => console.log(event, path))
However this works on both platforms. Am I missed something?