code: function (packages) {
    var resolvedPackages = {};
  
    _.forOwn(packages, function (definition, packageName) {
      if (!definition) return;
  
      var git = definition.git;
      if (!git) return;
  
      var repo = resolvedPackages[git] = resolvedPackages[git] || {};
  
      // If no branch provided - checkout origin HEAD and
      // don't show 'detached HEAD' notification
      branch = definition.branch || '-q origin';
      // If no version provided - pull HEAD
      version = definition.version || 'HEAD';
      repo[branch] = repo[branch] || {};
      repo[branch][version] = repo[branch][version] || {};
      repo[branch][version][packageName] = definition.path || '';
    });
  
    return resolvedPackages;
  }
docs: Create a packages document per git url. { gitRepo: { version: { packageName: packagePath, .. }, ... } }