apache / cordova-plugman

Apache Cordova Plugman
https://cordova.apache.org/
Apache License 2.0
399 stars 151 forks source link

Refactor src/util/config-changes.js #49

Closed kamrik closed 10 years ago

kamrik commented 10 years ago

The main goals:

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

kamrik commented 10 years ago

Done for all the comments so far except why we store the queue on disk (which I want to deal with in a future refactoring round).