You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Doug Davies (JIRA)" <ji...@apache.org> on 2017/09/25 14:51:00 UTC
[jira] [Commented] (CB-13009) cordova prepare unnecessarily edits
config.xml and package.json
[ https://issues.apache.org/jira/browse/CB-13009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16179128#comment-16179128 ]
Doug Davies commented on CB-13009:
----------------------------------
I don't like that my original package.json and config.xml get overwritten either. I manage them myself and have lots of comments in them to detail intricacies. I also group things together so that they make logical sense for me. How can I get cordova to not touch these files? I tried --nosave on prepare and "cordova config set autosave false". Let me know if there is a better place we can have this discussion.
> cordova prepare unnecessarily edits config.xml and package.json
> ---------------------------------------------------------------
>
> Key: CB-13009
> URL: https://issues.apache.org/jira/browse/CB-13009
> Project: Apache Cordova
> Issue Type: Improvement
> Components: cordova-cli
> Affects Versions: 7.0.1
> Environment: Mac OSX 10.12.5
> Node 8.1.2
> npm 5.0.3
> Reporter: Christian Tschanz
> Priority: Minor
>
> I crafted my config.xml file by hand (and added comments) to make it more readable and maintainable. I also removed all '^' or '~' from the versions of the engines/plugins to fix the version to one specific one (I will manually test new versions and update if possible). I also removed the '^' from the package.json file it generates.
> When running 'cordova prepare' it will completely re-create the config.xml file and therefore re-format it. It will also re-add the '^' to all versions. It will also add the '^' to the versions in the package.json file.
> This is VERY annoying. Previous versions did not behave like this. They only edited the config.xml if explicitly told to do so. I really, really want to fix the versions to a specific one and don't want it to always add the '^'. I would also prefer it if it the 'prepare' command would not re-create the config.xml file as there is no need for that and it kills all formatting and comments.
> At the moment I hope it respects the 'package-lock' file when installing plugins because I can't have it install newer versions automatically. Sadly many plugins are not as stable and well maintained for such an automatic update to work well in large projects.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org