const gaze = require('gaze')
gaze('src/**/*', function(err, watcher) {
// Files have all started watching
// watcher === this
if (err) console.error(err)
console.log('gazing')
// On changed/added/deleted
this.on('all', function(event, filepath) {
console.log(filepath + ' was ' + event)
})
this.on('error', err => console.error)
})
when I create a new folder in the images folder, console log 'src/images/untitled/ was added', that's correct, but then I rename it to 'test', console log 'src/images/test/ was added', nothing to do with the untitled folder. When I delete the untitled folder, nothing printed. More precisely, it seems dont react to any deletion of folders.
even though I set glob to 'src/*/', sometimes it will print 'node_modules/ was added'
here's my code
when I create a new folder in the images folder, console log 'src/images/untitled/ was added', that's correct, but then I rename it to 'test', console log 'src/images/test/ was added', nothing to do with the untitled folder. When I delete the untitled folder, nothing printed. More precisely, it seems dont react to any deletion of folders. even though I set glob to 'src/*/', sometimes it will print 'node_modules/ was added'