Permalink
Browse files

Fix watch script

  • Loading branch information...
Constellation committed Feb 6, 2014
1 parent cdc9a6f commit 9ac423bf98eee93f6e1252bcd7f37c7520cc5cda
Showing with 6 additions and 2 deletions.
  1. +6 −2 tools/watch.coffee
View
@@ -51,20 +51,24 @@ fs.mkdir libdir, ->
compile src, dst
refresh = ->
+ console.log 'watch', srcdir
watcher.close() for watcher in watchers
fs.readdir srcdir, (err, files) ->
+ console.log files
for file in files
do ->
src = path.join srcdir, file
dst = path.join libdir, "#{path.basename file, '.coffee'}.js"
watcher = fs.watch src, (event, filename) ->
+ console.log 'starting...', event
if event is 'change'
compile src, dst
watchers.push watcher
# notify directory file list change
- fs.watch srcdir, (event, filename) ->
- do refresh
+ # fs.watch srcdir, (event, filename) ->
+ # console.log event
+ # do refresh
do refresh

0 comments on commit 9ac423b

Please sign in to comment.