 
 allNodeModules = () ->
   modules = {}
-  t.dfs directories = {path: "."}, (n) ->
+  t.bfs directories = {path: "."}, (n) ->
     if exists join(n.path, "package.json")
       n.json = pkgJson n.path
     if exists join(n.path, "requirejs-config.json")

allComponents = () ->
  results = []
  names = () -> component.json.name for component in results
  t.dfs allNodeModules(), (m) ->
    if m.json and isComponent(null, m.json) and m.json.name not in names()
      results.push(m)
  _.filter results, (m) -> m.path isnt "."

  dir = argv.staticpath
  return [] if not exists dir
  results = []
  t.bfs dirTree = {path: "."}, (n) ->
    if /test[^\/]*\.js$/.test(n.path) and basename(n.path)[0] isnt "."
      results.push(n.path)
    if fs.statSync(join(dir, n.path)).isDirectory()
