Rename listTree() to listTreeSync()

This commit is contained in:
Kevin Sawicki 2013-06-12 18:26:44 -07:00
parent 27d9da15dc
commit d77705a039
4 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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 = []

View File

@ -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$/, '')

View File

@ -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)