jashkenas/coffee-script — pull request #1846 by TrevorBurnham (2011-11-09 18:34:57+00:00)
Title: Using fs.watchFile if supported, fs.watch otherwise (fixes #1803)

This isn't elegant, but at least it doesn't do platform-sniffing. Instead, it:

* Improves backward compatibility (since it uses `fs.watchFile` under Node 0.4.x),
* Future-proofs us (in case `fs.watchFile` is removed in a future release), and
* Allows us to use the less-buggy `fs.watchFile` on non-Windows systems (see [discussion at #1803](https://github.com/jashkenas/coffee-script/issues/1803#issuecomment-2683842))

I've tested that it works on the Mac (detecting saves from Coda and everything); someone else will have to give it a whirl under Windows.