 allComponents = () ->
   results = []
   names = () -> component.json.name for component in results
-  t.dfs allNodeModules(), (m) ->
+  t.bfs 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.dfs 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()


allNodeModules = () ->
  modules = {}
  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")
