browserify / watchify

watch mode for browserify builds
Other
1.79k stars 181 forks source link

Resolve realPath prior to creating watcher (fixes #109) #111

Closed MylesBorins closed 9 years ago

MylesBorins commented 9 years ago

Async implementation of #110

The first commit abstracts the process of creating a watcher. The second commit uses fs.realpathSync to resolve the true path of a file before registering the watcher. While this is a somewhat naive way to handle the problem (which should probably be solved in chokidar), it is an elegant way to solve the problem until they fix things on their end.

It also stops us from breaking the test suite! The latest version of chokidar causes the test suite to asplode... as does replacing chokidar with gaze (which can be used with an almost identical api). You will notice there is a check to make sure that the real path of the file is not private, this is a check that is necessary if files are living in $TMPDIR

MylesBorins commented 9 years ago

hold off on this for right now. While this is causing the build to happen when it should, it is not properly invalidating the cache

MylesBorins commented 9 years ago

Closing... real problem is https://github.com/paulmillr/chokidar/commit/bb1531aa6f0ce1ae4cf8406df0547edaca9039b2