docs: function optimizePackageConfig(json) {
    if (json.systemjs)
      json = json.systemjs;
  
    // remove non SystemJS package config properties
    var loaderConfigProperties = ['baseDir', 'defaultExtension', 'format', 'meta', 'map', 'main'];
    for (var p in json)
      if (loaderConfigProperties.indexOf(p) == -1)
        delete json[p];
  
    if (json.map && !json.map['@env']) {
      Object.keys(json.map).forEach(function(target) {
        var mapped = json.map[target];
  
        if (typeof mapped == 'string' && mapped.substr(0, 6) == '@node/')
          delete json.map[target];
  
        if (typeof mapped == 'object') {
          Object.keys(mapped).forEach(function(condition) {
            if (condition == 'node')
              delete mapped[condition];
          });
          if (!hasProperties(mapped))
            delete json.map[target];
        }
      });
  
      if (!hasProperties(json.map))
        delete json.map;
    }
  
    return json;
  }