Skip to content

Commit

Permalink
fixed for missing #include
Browse files Browse the repository at this point in the history
  • Loading branch information
shavyg2 committed Apr 12, 2014
1 parent c84eaf4 commit 82d6c34
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
1 change: 0 additions & 1 deletion bin/FileFinder.js

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

12 changes: 9 additions & 3 deletions bin/FileScanner.js

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

2 changes: 1 addition & 1 deletion bin/Main.js

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

1 change: 0 additions & 1 deletion src/FileFinder.coffee
Expand Up @@ -19,7 +19,6 @@ class FileFinder
else
throw new Error("No Idea how to Handle file not found")
catch e
console.log e
e=new Error("Files doesn't exist")
e.required=@getAbsolutePath()
throw e
Expand Down
9 changes: 6 additions & 3 deletions src/FileScanner.coffee
Expand Up @@ -4,7 +4,7 @@ fs= require "fs"
class FileScanner
constructor:(@path,@watch)->
@files=[]
@fileExt=["coffee"]
@fileExt=["coffee","js"]
@fileExt=@fileExt.join("|")

@scan()
Expand All @@ -28,8 +28,11 @@ class FileScanner
FileScanner.resultTest= new RegExp("[^ ]+\.(#{@fileExt})")
fileWatch=FileScanner.resultTest.exec(result)
if fileWatch
@files.push(fileWatch[0])

try
fs.statSync(fileWatch[0])
@files.push(fileWatch[0])
catch e
console.log "in #{@path} : included file #{fileWatch[0]} doesn't exist"

complete:->

Expand Down
2 changes: 1 addition & 1 deletion src/Main.coffee
Expand Up @@ -26,7 +26,7 @@ recursive=(file)->
try
fileFinder.push new FileFinder(file,program.watch)
catch e
console.log "in #{file}, file '#{e.required}' doesn't exist"
console.log "file '#{file}' doesn't exist"

for f in fileFinder[fileFinder.length-1].includeStack
if f.required isnt ""
Expand Down

0 comments on commit 82d6c34

Please sign in to comment.