You should definitely have both of these files under version control. package.json is the primary source for specifying dependencies in Cordova 9. Specifying them in config.xml will probably be not supported anymore in Cordova 10. All other application configuration will remain in config.xml.
The duplication is temporary during the migration. Cheers, Raphael Armen Michaeli <armen.micha...@gmail.com> schrieb am So., 21. Apr. 2019, 09:42: > Hi all, > > I want to track the minimal amount of actual source code (that which I > wrote) for my Cordova application with Git, meaning that currently I have > config.xml and through a submodule, the 'www' folder, commited with a Git > repository. > > The problem is that I don't understand how I would advise people to reuse > my repository if they want to work on the application -- config.xml alone > does not work with `cordova platform add android` but I don't want to add > all the cruft in 'android' folder to the repository either, because I do > not consider it original source code -- meaning that it can be and is > generated by `cordova platform add android` command. > > I see that `cordova create ...` adds a config.xml and package.json when > creating new application, from a template I presume. But I need to somehow > share my work, meaning I have config.xml already. I have package.json as > well, but I am reluctant to commit it because it contains duplicate > information about the application and also because I may not consider it > original source code either, at least not all of it. > > How do I solve this problem, and why is there identical information being > duplicated in two files? > > Thank you, >