code: function updateConfigFilesFrom (sourceConfig, configMunger, locations) {
      // First cleanup current config and merge project's one into own
      var defaultConfig = locations.defaultConfigXml;
      var ownConfig = locations.configXml;
      var sourceCfg = sourceConfig.path;
      // If defaults.xml is present, overwrite platform config.xml with it.
      // Otherwise save whatever is there as defaults so it can be
      // restored or copy project config into platform if none exists.
      if (fs.existsSync(defaultConfig)) {
          events.emit('verbose', 'Generating platform-specific config.xml from defaults for windows at ' + ownConfig);
          shell.cp('-f', defaultConfig, ownConfig);
      } else if (fs.existsSync(ownConfig)) {
          shell.cp('-f', ownConfig, defaultConfig);
      } else {
          shell.cp('-f', sourceCfg, ownConfig);
      }
  
      // Then apply config changes from global munge to all config files
      // in project (including project's config)
      configMunger.reapply_global_munge().save_all();
  
      events.emit('verbose', 'Merging project\'s config.xml into platform-specific windows config.xml');
      // Merge changes from app's config.xml into platform's one
      var config = new ConfigParser(ownConfig);
      xmlHelpers.mergeXml(sourceConfig.doc.getroot(),
          config.doc.getroot(), 'windows', /* clobber= */true);
  
      config.write();
      return config;
  }
docs: Updates config files in project based on app's config.xml and config munge,
  generated by plugins.
  
  @param   {ConfigParser}   sourceConfig  A project's configuration that will
  be merged into platform's config.xml
  @param   {ConfigChanges}  configMunger  An initialized ConfigChanges instance
  for this platform.
  @param   {Object}         locations     A map of locations for this platform
  
  @return  {ConfigParser}                 An instance of ConfigParser, that
  represents current project's configuration. When returned, the
  configuration is already dumped to appropriate config.xml file.