tools/scan_deps.js
function scanDeps() {
  var provideMap = new ProvideMap_();
  var requireMap = new RequireMap_();
  scanFiles(relativeGlob('lib'), provideMap, requireMap);

  var closureRequire = new RequireMap_();
  var closureProvide = new ProvideMap_();
  var closurePath = config.CLOSURE_LIBRARY_PATH + '/closure/goog';
  scanFiles(relativeGlob(closurePath), closureProvide, closureRequire);

  var closureDeps =
      extractClosureDependencies(requireMap, closureRequire, closureProvide);

  var edges = requireMap.getTopoSortEntry(provideMap, closureProvide);
  var edgesClosure = closureRequire.getTopoSortEntry(
      closureProvide, closureProvide, closureDeps);

  var topoSorter = new Toposort();
  edges.forEach(function(entry) {
    topoSorter.add(entry.name, entry.depends);
  });
  var topoSorterClosure = new Toposort();
  edgesClosure.forEach(function(entry) {
    topoSorterClosure.add(entry.name, entry.depends);
  });

  var files = [pathMod.resolve(
      pathMod.join(config.CLOSURE_LIBRARY_PATH, 'closure/goog/base.js'))];
  files = files.concat(topoSorterClosure.sort().reverse());
  files = files.concat(topoSorter.sort().reverse());

  return files;
}
function scanDeps() {
  var provideMap = new ProvideMap_();
  var requireMap = new RequireMap_();
  scanFiles(relativeGlob('lib'), provideMap, requireMap);

  var closureRequire = new RequireMap_();
  var closureProvide = new ProvideMap_();
  var closurePath = config.CLOSURE_LIBRARY_PATH + '/closure/goog';
  scanFiles(relativeGlob(closurePath), closureProvide, closureRequire);

  var closureDeps =
      extractClosureDependencies(requireMap, closureRequire, closureProvide);

  var edges = requireMap.getTopoSortEntry(provideMap, closureProvide);
  var edgesClosure = closureRequire.getTopoSortEntry(
      closureProvide, closureProvide, closureDeps);

  var topoSorter = new Toposort();
  edges.forEach(function(entry) {
    topoSorter.add(entry.name, entry.depends);
  });
  var topoSorterClosure = new Toposort();
  edgesClosure.forEach(function(entry) {
    topoSorterClosure.add(entry.name, entry.depends);
  });

  var files = [pathMod.resolve(
      pathMod.join(config.CLOSURE_LIBRARY_PATH, 'closure/goog/base.js'))];
  files = files.concat(topoSorterClosure.sort().reverse());
  files = files.concat(topoSorter.sort().reverse());

  return files;
}
function scanDeps ( ) { var provideMap = new ProvideMap_ ( ) ; var requireMap = new RequireMap_ ( ) ; scanFiles ( relativeGlob ( 'lib' ) , provideMap , requireMap ) ; var closureRequire = new RequireMap_ ( ) ; var closureProvide = new ProvideMap_ ( ) ; var closurePath = config . CLOSURE_LIBRARY_PATH + '/closure/goog' ; scanFiles ( relativeGlob ( closurePath ) , closureProvide , closureRequire ) ; var closureDeps = extractClosureDependencies ( requireMap , closureRequire , closureProvide ) ; var edges = requireMap . getTopoSortEntry ( provideMap , closureProvide ) ; var edgesClosure = closureRequire . getTopoSortEntry ( closureProvide , closureProvide , closureDeps ) ; var topoSorter = new Toposort ( ) ; edges . forEach ( function ( entry ) { topoSorter . add ( entry . name , entry . depends ) ; } ) ; var topoSorterClosure = new Toposort ( ) ; edgesClosure . forEach ( function ( entry ) { topoSorterClosure . add ( entry . name , entry . depends ) ; } ) ; var files = [ pathMod . resolve ( pathMod . join ( config . CLOSURE_LIBRARY_PATH , 'closure/goog/base.js' ) ) ] ; files = files . concat ( topoSorterClosure . sort ( ) . reverse ( ) ) ; files = files . concat ( topoSorter . sort ( ) . reverse ( ) ) ; return files ; }
Find Closure dependency files for the lib.
@return {!Array<string>}
Find Closure dependency files for the lib .