apache/cordova-plugman — pull request #51 by kamrik (2014-02-19 19:07:54+00:00)
Title: Refactor src/util/config-changes.js

Reopening after rebase, instead of https://github.com/apache/cordova-plugman/pull/49

The main goals:

Better readability
Avoid multiple re-parsing of the same config files.
Faster "cordova prepare"
Changes are restricted to only the config-changes.js file and its spec. There are some adapter functions to avoid changes in other files for now.

Most of the functionality is now part of the PlatformMunger class.
ConfigKeeper and ConfigFile classes are used for some abstraction and caching when manipulating various config files.
plugin.xml and platform.json files are still treated the old way and re-parsed every time.
platform.json is dangerous to cache because it's written to in many places in plugman..

npm test - ok (iOS and Linux)
diff between cordova projects created with this and master versions is empty (except UUIDs in pbxproj and ordering of the inserted tag in config.xml)

"cordova prepare" change that uses the new reapply_global_munge() function:
https://github.com/kamrik/cordova-cli/commit/88f2ff7995f55b4c3e61aa46b00fe6c8813d57a3