         timeLog "compiled #{source}"
   path.exists jsDir, (exists) ->
     if exists then compile() else exec "mkdir -p #{jsDir}", compile
-    
+
 # When watching scripts, it's useful to log changes with the timestamp.
 timeLog = (message) ->
   console.log "#{(new Date).toLocaleTimeString()} - #{message}"

    jsPath = outputPath source, base
    path.exists jsPath, (exists) ->
      if exists
        fs.unlink jsPath, (err) -> 
          throw err if err
          timeLog "removed #{source}"
        
# Get the corresponding output JavaScript path for a source file.
outputPath = (source, base) ->
  filename  = path.basename(source, path.extname(source)) + '.js'

# time the file is updated. May be used in combination with other options,
# such as `--lint` or `--print`.
watch = (source, base) ->

  prevStats = null

  compile = ->
    fs.stat source, (err, stats) ->
      throw err if err
