How to install all my codrova plugins listed in package.json

Hi, I have two questions regarding my “package.json” file:

  1. When I start a default project it has included the following plugins:

    “cordovaPlugins”: [
    “com.ionic.keyboard”,
    “org.apache.cordova.console”,
    “org.apache.cordova.device” ]

Is there any command I can run to install them again except running cordova plugin add 3 times?

  1. If I want to add a new plugin, e.g. com.google.cordova.admob, is there a way to automatically add it in my “package.json”?
    Something like: cordova plugin add xxx --save (like with bower)

I’d say Raymond Camdon explains this very well in a blog post he just posted minutes ago :wink:
It responds exactly to your question.

ionic state reset

Something like this should work.

this worked nicely for me.

here is a good link with some useful state commands:

there is cordova compare

try it

http://cordova.apache.org/docs/en/latest/platform_plugin_versioning_ref/index.html

Hi guys,
I have developped a small plugin to download and install all plugins listed in plugins/fetch.json (this file contains also the variables used when you install some plugins that’s why I chosed it).
You can check it here : https://github.com/vlafranca/cordova-fetch-plugins

actually, it’s:
# ionic state restore
not reset.

# ionic state
it has been removed as of CLI 3.0.

This command is working:

# ionic cordova prepare

Cordova will install platforms and plugins listed in config.xml

ionic cordova prepare

ionic state reset has been removed as of CLI 3.0.

User ionic cordova prepare to install all plugins listed in package.json

ionic cordova prepare

install platforms and plugins listed in config.xml

Run npm install before

my ionic version 3.20.0
my cordova version 8.0.0

Nice, ionic cordova prepare working good.