Please sign in to comment.
Live Reload: Handle "rename" event and re-watch file
- Symptom: When using an editor (e.g. like Vim) that renames a file when saving changes, socketstream Live Reload will stop working after the first change reload. - Change: Check for the "rename" event, close old watch and open a new watch for the file. - Test: Besides testing functionality, run in bash: ls -l /proc/<pid>/fd | grep inotify | wc -l and ensure line count stays the same across multiple watch file changes. <pid> is the process id of the running socketstream node app. - Based on Trevor Burnhams answer to: http://stackoverflow.com/questions/8280915/coffeescript-1-1-3-watch-only-works-once - OS: Ubuntu 10.04
- Loading branch information...
Showing with 15 additions and 4 deletions.