There are various permutations for adding a Cordova plugin (ie, (ionic|cordova|phonegap) plugin add [--save]
), and I know Ionic has hooks (after_plugin_add
, after_plugin_rm
, etc) for handling plugins. What’s the “proper” way to add a plugin in Ionic? ionic plugin add
? With/without --save
?
The reason I ask is that sometimes I notice plugins getting added to plugins/*.json
, other times to config.xml
, other times to package.json
. Additionally .gitignore
ignores plugins/*
, so those added plugins don’t get registered in VC. Then every once in a while hooks/*
gets modified, and I’m still not sure what triggers that…
So yeah, how to add plugins properly, and in a way that sticks with git?