How to save used plugins list?


#1

Hello. I have a dumb question, but yet didn’t find an answer to it… How do you manage your plugin dependencies in Ionic 2?

For example I\m working through 2 different pc. The code is sync through GIT. After cloning the code to other pc I need manually by hand add all required plugins. Is it possible somehow through package.json file get all required plugins?


#2

To add plugin to your project:
ionic plugin add cordova-plugin-network-information --save

To save your plugin to package.json, run this command:
ionic state save


#3

after installing plugin ,doesn’t it get saved automatically in package json .or i am missing something basic


#4

it wont get saved automatically, you need to run this command to save it to package.json

ionic state save

#5

ionic cordova plugin save


#6

global packages:

@ionic/cli-utils : 1.1.2
Cordova CLI      : 6.5.0 
Ionic CLI        : 3.1.2

local packages:

@ionic/app-scripts              : 1.3.6
@ionic/cli-plugin-cordova       : 1.1.2
@ionic/cli-plugin-ionic-angular : 1.1.2
@ionic/cli-plugin-ionic1        : 1.2.0
Ionic Framework                 : ionic-angular 3.1.1
Ionic Framework                 : unknown

This is my info and the only thing that works for me now is “cordova plugin save” and it stores it to the config.xml, no longer the cordovaPlugins key in the package.json