napcs/node-livereload — pull request #6 by Leftium (2013-07-06 05:54:25+00:00)
Title: Use file system events instead of polling.

**Warning!** This is the first of two conflicting pull requests. There are three options:

1. Merge only this pull request. File system events are less laggy and use less CPU, but they did introduce socket errors (which I worked-around) and may introduce compatibility issues with other systems/older versions of Node.js.
2. Merge only the other pull request. A safer, more conservative change that removes most of the delay at the cost of extra CPU.
3. Support both file system events and polling by adding an option and combining these two pull requests. Shouldn't be that hard.

*Commit message:*

Replace fs.watchFile with fs.watch.
Best of both worlds: minimal lag and minimal CPU usage!

Socket errors started being thrown; wrapped and ignored with try block.
Does not seem to affect live browser reload.