Comments (11)
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.
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.
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.
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.
Because it needs to be updated ;)
The issue is already tracked here: apache/cordova-app-hello-world#39
from cordova-lib.
Phonegap build relies on the plugins to be listed in the config.xml though which is an issue.
from cordova-lib.
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.
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.
@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.
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.
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)
- Cordova platform add android, removes node modules with semver HOT 3
- Improve how Cordova checks for required project information HOT 1
- plugin.xml <dependency> tag commit attribute doesn't work as documented for branches HOT 1
- cordova prepare not resolving platform specification correctly for devDependency HOT 1
- NodeJS14: Warning: Accessing non-existent property 'android' HOT 3
- Unable to remove a plugin using a not officially supported platform HOT 1
- Process.env variables are not present in hooks HOT 1
- Cordova doesn't work with NPM 7 HOT 15
- Failure to install plugin with url#git_ref:subdir spec HOT 1
- One test fails on CI HOT 1
- Wrong platform version is detected when dependencies and devDependencies are both present HOT 1
- Fail to add plugin with prerelease version because of "Invalid Version" HOT 1
- Dependencies are wiped on each step of project creation with cordova-lib and NPM 7 HOT 2
- Question About API 24 And API 30 And Question About How Make Jar Using Cordova 9.1.0 And Cordova 10.0.0 (Solution for jcenter() deprecated) HOT 1
- restore-util doesn't properly find platform spec info
- Adding plugins for only specific platforms HOT 10
- Cordova uses the wrong working directory and loads top-level config.xml HOT 1
- Bug(tests): Test#012 failure HOT 5
- Why cordova-android 12.0.0 is not used ? HOT 2
- ondeviceready won't fire because plugin does not cleanup after itself properly when removed(?) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-lib.