Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13009

cordova prepare unnecessarily edits config.xml and package.json

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 7.0.1
    • None
    • cordova-cli
    • Mac OSX 10.12.5
      Node 8.1.2
      npm 5.0.3

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            chtsch Christian Tschanz
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: