mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Rename listTree() to listTreeSync()
This commit is contained in:
parent
27d9da15dc
commit
d77705a039
@ -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
|
||||
|
@ -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 = []
|
||||
|
@ -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$/, '')
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user