gaze icon indicating copy to clipboard operation
gaze copied to clipboard

weird things when manipulating folder

Open tracy2zhang opened this issue 8 years ago • 2 comments

here's my code

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'

tracy2zhang avatar Mar 07 '17 06:03 tracy2zhang

Which OS, version and nodejs version?

shama avatar Mar 25 '17 17:03 shama

@shama macOS v10.12.3 nodejs v7.7.2

tracy2zhang avatar Mar 27 '17 07:03 tracy2zhang