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 #51

Closed kamrik closed 10 years ago

kamrik commented 10 years ago

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

agrieve commented 10 years ago

Merged.

agrieve commented 10 years ago

Please close the request.

kamrik commented 10 years ago

merged at https://git-wip-us.apache.org/repos/asf?p=cordova-plugman.git;a=commit;h=e5fa81490cfa0d10e39f5133d8c56aff8fbac4e2