Skip to content

Commit

Permalink
added fix for folder scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
franklinkim committed Nov 22, 2013
1 parent 91b7753 commit 8669225
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
21 changes: 12 additions & 9 deletions lib/toaster.js

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

10 changes: 5 additions & 5 deletions src/toaster/core/builder.coffee
Expand Up @@ -107,7 +107,7 @@ class Builder
tree = {}
for folder in @config.src_folders
t = (tree[folder.alias] = {}) if folder.alias?
@_build_ns_tree t || tree, folder.path
@_build_ns_tree(t || tree, folder.path)

buffer = ""
for name, scope of tree
Expand All @@ -123,13 +123,13 @@ class Builder
###
_build_ns_tree: (tree, folderpath) ->
return unless fs.lstatSync(folderpath).isDirectory()
folders = fsu.ls(folderpath)
for folder in folders
for file in fsu.ls(folderpath)
continue unless fs.lstatSync(file).isDirectory()
include = true
for item in @exclude
include &= !(new RegExp( item ).test folder)
include &= !(new RegExp(item).test file)
if include
@_build_ns_tree (tree[folder.match /[^\/\\]+$/m] = {}), folder
@_build_ns_tree((tree[file.match /[^\/\\]+$/m] = {}), file)

###
@return {String}
Expand Down
2 changes: 1 addition & 1 deletion test/coverage.html

Large diffs are not rendered by default.

0 comments on commit 8669225

Please sign in to comment.