Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inconsistency between 010_install_plugins.js hook and ionic state reset way to read package.json plugins #1226

Closed
Freundschaft opened this issue Aug 1, 2016 · 2 comments

Comments

@Freundschaft
Copy link

The 010_install_plugins.js hooks added by using ionic hooks add uses a different method of adding plugins, allowing it only to read strings for cordova plugins add (https://github.com/driftyco/ionic-cli/blob/master/lib/hooks/after_platform_add/010_install_plugins.js#L26).
Something like

{
      "locator": "https://github.com/gfnork/Calendar-PhoneGap-Plugin.git",
      "id": "cordova-plugin-calendar"
}

will fail to be added by this hook.

This is largely inconsistent with the behavior of ionic state reset which uses a more sophisticated way to read the package.json and generate the cordova plugins add command. (https://github.com/driftyco/ionic-app-lib/blob/master/lib/state.js#L511)

I know the ionic state reset command is planned for deprecation, but to be honest, I think this could be fixed fast and painless until the ionic state reset command is removed

@Freundschaft
Copy link
Author

I just added a PR for the changes by simply Copy pasting from ionic app lib, can this be merged?

@jgw96
Copy link
Contributor

jgw96 commented Aug 8, 2016

Hello! Thanks for opening an issue with us. We are currently in the process of deprecating the ionic state commands in favor of doing it the cordova way. https://cordova.apache.org/docs/en/latest/platform_plugin_versioning_ref/index.html You can keep up with the status of this on #904 . Thanks for using Ionic!

@jgw96 jgw96 closed this as completed Aug 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants