apache/cordova-plugman — pull request #49 by kamrik (2014-02-14 16:54:04+00:00)
Title: Refactor src/util/config-changes.js

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