 # is passed, recursively compile all '.coffee', '.litcoffee', and '.coffee.md'
 # extension source files in it and all subdirectories.
 compilePath = (source, topLevel, base) ->
+  return if source in sources   or
+            watchedDirs[source] or
+            not topLevel and (notSources[source] or hidden source)
   try
     stats = fs.statSync source
   catch err

    compileScript(source, code.toString(), base)
  else
    notSources[source] = yes
    removeSource source, base


# Compile a single source script, containing the given code, according to the
# requested options. If evaluating the script directly sets `__filename`,

      console.error "File not found: #{source}"
      process.exit 1
    throw err
  if stats.isDirectory()
    if path.basename(source) is 'node_modules'
      notSources[source] = yes
      return
    watchDir source, base if opts.watch
    try
      files = fs.readdirSync source
    catch err
      if err.code is 'ENOENT' then return else throw err
    for file in files
      compilePath (path.join source, file), no, base
  else if topLevel or helpers.isCoffee source
    sources.push source
    sourceCode.push null
    delete notSources[source]
    watch source, base if opts.watch
    try
      code = fs.readFileSync source
