Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weird things when manipulating folder #236

Open
tracy2zhang opened this issue Mar 7, 2017 · 2 comments
Open

weird things when manipulating folder #236

tracy2zhang opened this issue Mar 7, 2017 · 2 comments

Comments

@tracy2zhang
Copy link

tracy2zhang commented Mar 7, 2017

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'

@shama
Copy link
Owner

shama commented Mar 25, 2017

Which OS, version and nodejs version?

@tracy2zhang
Copy link
Author

@shama macOS v10.12.3 nodejs v7.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants