docs: function detectDependencies(config) {
    var allDependencies = {};
  
    if (config.get('dependencies')) {
      $._.assign(allDependencies, config.get('bower.json').dependencies);
    }
  
    if (config.get('dev-dependencies')) {
      $._.assign(allDependencies, config.get('bower.json').devDependencies);
    }
  
    if (config.get('include-self')) {
      allDependencies[config.get('bower.json').name] = config.get('bower.json').version;
    }
  
    $._.each(allDependencies, gatherInfo(config));
  
    config.set('global-dependencies-sorted', filterExcludedDependencies(
      config.get('detectable-file-types').
        reduce(function (acc, fileType) {
          if (!acc[fileType]) {
            acc[fileType] = prioritizeDependencies(config, '.' + fileType);
          }
          return acc;
        }, {}),
      config.get('exclude')
    ));
  
    return config;
  }