Search code examples
cordovaphonegap-pluginscordova-pluginsionic-framework

Best practices for Cordova/Ionic Plugins management?


What are the best practices for checking in plugins for my Ionic/Cordova project?

I would like to minimize the number of files that are checked into my project. Mainly I do not want to checkin any file that my project downloads from an outside source and also want to leave out any files generated with my build command.

The hope is to checkout my project and then run ionic platform add <platform> ;ionic build <platform> and be good to go.

I'm not sure how to implement in the root config.xml file or in a plugins/<platform>.json file

I've also tried using the hooks/after_platform_add/010_install_plugins.js, so far this seems to be the best option.

Any tips would be much appreciated thanks.


Solution

  • Not a bad idea to do it in the hooks. Here is an example along that idea: http://jbavari.github.io/blog/2014/06/24/managing-cordova-plugins-with-package-dot-json-and-hooks/