ionic-cli: The ionic-cli is not saving the variables to package.json on plugin add

Plugin variables aren’t being saved to the package.json after running ionic plugin add submodules/phonegap-facebook-plugin --variable APP_ID=SOMEID --variable APP_NAME=someName.

I checked the source of State in ionic-app-lib and it takes a variables arguments (source), but the ionic-cli does not pass it along (source).

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15

Commits related to this issue

Most upvoted comments

Hi @maksymilian-majer @jbavari

Just a quick question. This has been closed but I’m not sure if this resolved. If I add a plugin with variables, it saves to config.xml but not to package.json

Is it supposed to work that way and do we need to add the plugins and config to package.json manually? For example:

  "cordovaPlugins": [
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard",
    {
      "id": "cc.fovea.cordova.purchase",
      "locator": "https://github.com/j3k0/cordova-plugin-purchase.git",
      "variables": {
        "BILLING_KEY": "SOME_KEY_VALUE"
      }
    },
    {
      "id": "cc.fovea.plugins.newsstand",
      "locator": "https://github.com/j3k0/PhoneGap-Newsstand-iOS.git"
    }
  ]

Thank you for your input.