1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
This commit is contained in:
Jeremy Ashkenas 2010-12-28 17:46:54 -08:00
parent c16c90c00a
commit 83d424f2f4
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@
base = path.join(source);
compile = function(source, topLevel) {
return path.exists(source, function(exists) {
if (!exists) {
if (topLevel && !exists) {
throw new Error("File not found: " + source);
}
return fs.stat(source, function(err, stats) {

View file

@ -76,7 +76,7 @@ compileScripts = ->
base = path.join(source)
compile = (source, topLevel) ->
path.exists source, (exists) ->
throw new Error "File not found: #{source}" unless exists
throw new Error "File not found: #{source}" if topLevel and not exists
fs.stat source, (err, stats) ->
if stats.isDirectory()
fs.readdir source, (err, files) ->