jashkenas/coffee-script — pull request #1963 by TrevorBurnham (2011-12-22 19:04:36+00:00)
Title: Rewatch files on change event

See discussion at #1853. Somehow, at least one application (the TextMate 2 alpha) is saving files in such a way that a single `change` event is emitted—and then the file no longer emits events, as if it had been deleted. My hunch is that the `change` event is somehow shadowing a `rename` event.

It's unclear whose bug this really is. Maybe it's something that can be fixed in `fs.watch`? Or maybe TM2 is doing something it shouldn't do? But we can work around it by re-watching files on every `change`, just as we re-watch them on every `rename`. With this patch, `coffee --watch` treats all file events as synonymous, hopefully giving us more consistent behavior.