You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hooks/after_plugin_add/register_plugins.js is supposed to make sure that for a "cordova plugin add ...", a line is added to package.json, more precisely, to the cordovaPlugins array. A "ionic state restore" is able to install all plugins from the cordovaPlugins, e.g. after you check out your app from a git repo that doesn't contain the plugins directory.
There's a check in register_plugins.js that is supposed to make sure that cordovaPlugins doesn't contain duplicates. Here's how the check is being currently done:
if (packageJSON.cordovaPlugins.indexOf(plugin) !== -1) {
packageJSON.cordovaPlugins.push(plugin);
}
"!== -1" should read "== -1". This bug causes only those plugins to be added to package.json which are already in there. If you add a new plugin, package.json won't be changed. You can add plugin entries manually, but every "ionic state restore" call (which internally calls "cordova plugin add ..." for all plugins in package.json) will duplicate the plugins list.
The text was updated successfully, but these errors were encountered:
hooks/after_plugin_add/register_plugins.js is supposed to make sure that for a "cordova plugin add ...", a line is added to package.json, more precisely, to the cordovaPlugins array. A "ionic state restore" is able to install all plugins from the cordovaPlugins, e.g. after you check out your app from a git repo that doesn't contain the plugins directory.
There's a check in register_plugins.js that is supposed to make sure that cordovaPlugins doesn't contain duplicates. Here's how the check is being currently done:
"!== -1"
should read"== -1"
. This bug causes only those plugins to be added to package.json which are already in there. If you add a new plugin, package.json won't be changed. You can add plugin entries manually, but every "ionic state restore" call (which internally calls "cordova plugin add ..." for all plugins in package.json) will duplicate the plugins list.The text was updated successfully, but these errors were encountered: