Reputation: 697
I'm working on a phonegap app and i've created a remote Git repository for it. This is my .gitignore
# Mac
.DS_Store
#phpstorm
.idea
# Node
npm-debug.log
/node_modules
# Cordova
/platforms
/plugins
# res
resources/signing
Now where should i specify which plugins are required for my app? And what command should the programmer (who clones my repo) run to get those plugins? I'm seeing a lot of contradictory information - for example there are multiple plugin definitions in config.xml and then there is a fetch.json file in /plugins folder.
Upvotes: 0
Views: 28
Reputation: 64644
I think the preferred method is to save references to all of your plugins in config.xml and restore them when you check out the repository. You've already taken care of the first step and git-ignored the plugins and platforms folder.
The easiest way to add a plugin to config.xml is to use the save flag. e.g.
cordova plugin add cordova-plugin-device --save
Plugins saved in config.xml are automatically restored during the prepare step. For example if a programmer clones your repo and wants to restore all the iOS plugins, they would run cordova prepare ios
and it would build the platforms and plugins folder automatically, adding in all of the plugins listed in config.xml.
Upvotes: 1