Skip to content

Commit

Permalink
Rename listTree() to listTreeSync()
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsawicki committed Jun 13, 2013
1 parent 27d9da1 commit d77705a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spec/spec-suite.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ measure 'spec suite require time', ->
require 'spec-helper'

# Run core specs
for specPath in fsUtils.listTree(fsUtils.resolveOnLoadPath("spec")) when /-spec\.coffee$/.test specPath
for specPath in fsUtils.listTreeSync(fsUtils.resolveOnLoadPath("spec")) when /-spec\.coffee$/.test specPath
require specPath

# Run extension specs
for packageDirPath in config.packageDirPaths
for packagePath in fsUtils.listSync(packageDirPath)
for specPath in fsUtils.listTree(path.join(packagePath, "spec")) when /-spec\.coffee$/.test specPath
for specPath in fsUtils.listTreeSync(path.join(packagePath, "spec")) when /-spec\.coffee$/.test specPath
require specPath
2 changes: 1 addition & 1 deletion spec/stdlib/fs-utils-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe "fsUtils", ->
paths.push(childPath)
true
fsUtils.traverseTreeSync fixturesDir, onPath, onPath
expect(paths).toEqual fsUtils.listTree(fixturesDir)
expect(paths).toEqual fsUtils.listTreeSync(fixturesDir)

it "does not recurse into a directory if it is pruned", ->
paths = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class PackageGeneratorView extends View
templatePath = fsUtils.resolveOnLoadPath(path.join("package-generator", "template"))
packageName = path.basename(@getPackagePath())

for templateChildPath in fsUtils.listTree(templatePath)
for templateChildPath in fsUtils.listTreeSync(templatePath)
relativePath = templateChildPath.replace(templatePath, "")
relativePath = relativePath.replace(/^\//, '')
relativePath = relativePath.replace(/\.template$/, '')
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib/fs-utils.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ module.exports =
'.' + ext.replace(/^\./, '')
paths.filter (path) -> _.include(extensions, Path.extname(path))

listTree: (rootPath) ->
listTreeSync: (rootPath) ->
paths = []
onPath = (path) =>
paths.push(path)
Expand Down

0 comments on commit d77705a

Please sign in to comment.