Coffeescript 1.1.3 Clock only works once

I have nodejs v0.6.3 and coffeescript 1.1.3. on Archlinux.

I know that they changed the way the watch works in the latest version of coffeescript, and at least node v0.6.2 is required for this watch.

In my case, it only works once. After that, when I save the file again, the coffee does not notice. What could be the problem here?

+8
coffeescript archlinux
source share
1 answer

There are a number of issues with fs.watch that I have been actively discussing on both Node and issues with CoffeeScript magazine. One of the problems - most likely one of the ones that you encounter - is that some programs save changes not by writing directly to an existing file, but by writing to a temporary file, and then mv for this file on top of the existing one. In fs.watch perspective fs.watch this means that the viewed file has been deleted, and changes to the new file will be ignored.

In the current CoffeeScript wizard, we try to get around this by repeatedly viewing the file each time the rename event is rename . So please install this and let me know if it solves your problem. If this is not the case, you should revert to using the older fs.watchFile API, either by downgrading to CoffeeScript 1.1.2, or using a third-party tool like my Jitter .

+10
source share

All Articles