Config munging is a core aspect of Cordova and a source of many issues for us. When reading the code to find causes of reported issues (like #156), I noticed that much of the existing code is really verbose and repetitive, making it hard to grasp what's going on.
So I went ahead and refactored the whole thing a bit, hopefully making it more approachable in the future.
Description
Hopefully, the commit messages provide enough context to see what's going on. I took great care to make the diffs most obvious whenever possible.
Testing
The existing unit tests still pass with one small change pertaining to an implementation detail.
Motivation and Context
Config munging is a core aspect of Cordova and a source of many issues for us. When reading the code to find causes of reported issues (like #156), I noticed that much of the existing code is really verbose and repetitive, making it hard to grasp what's going on.
So I went ahead and refactored the whole thing a bit, hopefully making it more approachable in the future.
Description
Hopefully, the commit messages provide enough context to see what's going on. I took great care to make the diffs most obvious whenever possible.
Testing
The existing unit tests still pass with one small change pertaining to an implementation detail.