Skip to content

Commit

Permalink
Merge branch 'rewatch2'
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorBurnham committed Dec 22, 2011
2 parents 4944fba + e5f3750 commit 21a499c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
20 changes: 8 additions & 12 deletions lib/coffee-script/command.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 6 additions & 9 deletions src/command.coffee
Expand Up @@ -174,19 +174,16 @@ watch = (source, base) ->

prevStats = null
compileTimeout = null
rewatchTimeout = null

watchErr = (e) ->
if e.code is 'ENOENT'
return if sources.indexOf(source) is -1
clearTimeout rewatchTimeout
rewatchTimeout = wait 25, ->
try
rewatch()
compile()
catch e
removeSource source, base, yes
compileJoin()
try
rewatch()
compile()
catch e
removeSource source, base, yes
compileJoin()
else throw e

rewatch = ->
Expand Down

0 comments on commit 21a499c

Please sign in to comment.