code: function updateConfigFile (sourceConfig, configMunger, locations) {
      events.emit('verbose', 'Generating config.xml from defaults for platform "osx"');
  
      // First cleanup current config and merge project's one into own
      // Overwrite platform config.xml with defaults.xml.
      shell.cp('-f', locations.defaultConfigXml, locations.configXml);
  
      // Then apply config changes from global munge to all config files
      // in project (including project's config)
      configMunger.reapply_global_munge().save_all();
  
      // Merge changes from app's config.xml into platform's one
      var config = new ConfigParser(locations.configXml);
      xmlHelpers.mergeXml(sourceConfig.doc.getroot(),
          config.doc.getroot(), 'osx', /* 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.