I use Cordova 5.0.0 and i have the following project structure:
MyProject - hooks - platforms - plugins - resources - www - config.xml
My question now is: Which of these folders can I omit? I ask it because I work on three different platforms. I Develop on linux for android, windows for windows phone and on mac for ios. If I commit the whole project I always get warnings and error for the not supported platforms.
What I want is a minimalistic git repository.
One problem for example are the plugins. When I delete the plugin folder from the repository I have to add them on each of my developing platform manually.
Another problem is the resources folder. I automatically generate icons and splashscreens using ionic. When I now try to build the project on ios, it is complaining about the images for android.
So what do I need and what can I omit?
You want to generally commit/push the source code and application configuration files such as pom. xml or any configuration files used in your build but you can also add any other kind of files. For example committing a changelog or even a word document (more rare but possible) may also be valid.
Starting April 1, 2022, the App Center service will no longer accept calls from the Cordova SDK. While the services may continue to work for a short period of time afterward, we do not guarantee interaction of services or availability in the App Center portal.
We have integrated the Android 12 SplashScreen API including the compatibility library into the core of the Cordova-Android platform to provide support for Android API 22+. For more information, please refer to the PR and Cordova Docs.
You can ignore the platforms and plugins directories as long as you haven't added any custom code in them.
When adding plugins and platforms add --save to the command. e.g.
cordova platform add [email protected] --save
or
cordova plugin add cordova-plugin-device --save
This will save a record of the plugins and platforms you use to your config.xml file. When you run cordova prepare
or cordova build
all of your plugins and platforms listed in config.xml will be installed if they haven't been already.
You can also specify a platform in prepare and build. So if you are on your Mac, you can check out the git repository and run cordova prepare ios
to install just the ios platform and plugins.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With