GithubHelp home page GithubHelp logo

Comments (11)

globules-io avatar globules-io commented on August 20, 2024 6

Let me vocalize my opinion on this change again. This is a very bad design. Both files should be kept in sync, or one file should go. As a matter of fact, package.json is a NPM thing, where config.xml is a Cordova thing. I don't see the point AT ALL to merge these 2 files. Whoever made that "design" needs to reconsider his/her involvement in this scale of a projects.

from cordova-lib.

dpogue avatar dpogue commented on August 20, 2024 1

will all those settings remain in config.xml and only plugins moving to package.json ?

Yes, only the dependencies (plugin and platform versions) are moving to package.json. All your app configuration continues to live in config.xml.

from cordova-lib.

dpogue avatar dpogue commented on August 20, 2024

This is by design: Cordova 9 does not save plugins or platforms to config.xml. They are saved to package.json instead.

They will be restored from both package.json and config.xml, but the intention is to push people towards using package.json for storing these dependencies.

from cordova-lib.

hunterloftis avatar hunterloftis commented on August 20, 2024

In that case, why does the default-generated "hello, world" app in cordova 9 supply its default whitelist plugin in config.xml but not in package.json?

from cordova-lib.

timbru31 avatar timbru31 commented on August 20, 2024

Because it needs to be updated ;)
The issue is already tracked here: apache/cordova-app-hello-world#39

from cordova-lib.

dandouglas avatar dandouglas commented on August 20, 2024

Phonegap build relies on the plugins to be listed in the config.xml though which is an issue.

from cordova-lib.

kim3er avatar kim3er commented on August 20, 2024

My have been debugging an issue with my remote builds, which turned out to be missing plugins.

I'm using Cordova v9, but the project started life at v4. The issue I faced was that plugins that existed locally, weren't being installed when built in the cloud (using Azure DevOps).

All the plugins were listed in package.json, but config.xml only included a partial list. The cloud build was only installing the partial list from config.xml.

Removing all the entries in config.xml resulted in no plugins being installed.

Manually listing all the plugins from package.json into config.xml resulted in all plugins being installed.

The build environment is macOS latest, Node 8.6.4. The package.json version of Cordova is ^9.0.0. All the scripts use Cordova in a local context. Cordova, to the best of my knowledge, is not installed globally.

My GIT repo has the follow Cordova related exclusions:

platforms/
plugins/
plugins/android.json
plugins/ios.json
www/

from cordova-lib.

codegreenie avatar codegreenie commented on August 20, 2024

Let me say i have faced same issue. Normally when you add a plugin from CLI, it should be added to config.xml for the sake of Phonegap build...This is very confusing for an inexperienced programmer and i am considering rolling back to Cordova CLI 8.1.0

from cordova-lib.

dpogue avatar dpogue commented on August 20, 2024

@codegreenie If you're working with PhoneGap Build, I'd recommend using the phonegap CLI tool rather than the cordova CLI tool.

from cordova-lib.

acedigibits avatar acedigibits commented on August 20, 2024

this is super confusing now. i used to add res/icon paths in config.xml , will all those settings remain in config.xml and only plugins moving to package.json ?

from cordova-lib.

globules-io avatar globules-io commented on August 20, 2024

Let me say i have faced same issue. Normally when you add a plugin from CLI, it should be added to config.xml for the sake of Phonegap build...This is very confusing for an inexperienced programmer and i am considering rolling back to Cordova CLI 8.1.0

For us, it is mostly that when you open config.xml you see everything, you know exactly where you at with the project. Like for instance, you see custom preferences and all the plugin stuff in config.xml and you see if the plugins are installed etc without opening package.json, which can also have stuff non related to cordova (that you might use for the front end). It way easier to know what's going on with your project. Package.json can become hard to read.

As long as you don't remove the plugin detection in config.xml, here we are ok since we keep on using config.xml for plugins since it's so much easier to copy paste from one config.xml to the other in case of multi apps.

You don't need to open packages.json

from cordova-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.