lib/file-matcher.js
function resolveGlobsAsync(filesAndPatterns, rootSrcDir) {
  var options = {cwd: rootSrcDir};

  var tasks = {};
  filesAndPatterns.forEach(function(fileOrPattern) {
    if (isGlobPattern(fileOrPattern)) {
      tasks[fileOrPattern] =
          underscore.partial(resolveGlobAsync, fileOrPattern, options);
    }
  });

  // TODO: Add kew.nfcall() and use that instead.
  // https://github.com/Obvious/kew/pull/21
  var deferred = kew.defer();
  async.parallel(tasks, deferred.makeNodeResolver());
  return deferred.promise;
}
function resolveGlobsAsync(filesAndPatterns, rootSrcDir) {
  var options = {cwd: rootSrcDir};

  var tasks = {};
  filesAndPatterns.forEach(function(fileOrPattern) {
    if (isGlobPattern(fileOrPattern)) {
      tasks[fileOrPattern] =
          underscore.partial(resolveGlobAsync, fileOrPattern, options);
    }
  });

  // TODO: Add kew.nfcall() and use that instead.
  // https://github.com/Obvious/kew/pull/21
  var deferred = kew.defer();
  async.parallel(tasks, deferred.makeNodeResolver());
  return deferred.promise;
}
function resolveGlobsAsync ( filesAndPatterns , rootSrcDir ) { var options = { cwd : rootSrcDir } ; var tasks = { } ; filesAndPatterns . forEach ( function ( fileOrPattern ) { if ( isGlobPattern ( fileOrPattern ) ) { tasks [ fileOrPattern ] = underscore . partial ( resolveGlobAsync , fileOrPattern , options ) ; } } ) ; // TODO: Add kew.nfcall() and use that instead. // https://github.com/Obvious/kew/pull/21 var deferred = kew . defer ( ) ; async . parallel ( tasks , deferred . makeNodeResolver ( ) ) ; return deferred . promise ; }
Does the glob resolution for all glob file patterns in input.
@param {!Array.<string>} filesAndPatterns
@param {string} rootSrcDir
@return {!Promise.<!Object.<string, !Array.<string>>>} A future map from
file pattern to list of resolved files (on success).
Does the glob resolution for all glob file patterns in input .