I'm trying to create comments in cordova's config.xml to explain what the various options included in there actually do, but every time I build the project the comments get stripped out. Is there a way of making sure they stay?
Instead of adding a xml comment <!-- --> you can try to add extra xml attribute to the xml tags.
The idea is to use an attribute that will be ignored by cordova but that should be kept when building.
(I have not checked if it's kept when adding plugins or other usages of the CLI)
ie:
<platform comment="Settings for android platform" name="android">
<preference comment="Set the minimum version of android for this app" name="android-minSdkVersion" value="16" />
note that comment is not a cordova keyword and that you'll have the same result with any keyword that's unknown to Cordova.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With