Michael
Michael

Reputation: 33307

How do I update installed PhoneGap/Cordova Plugins?

When using PhoneGap/Cordova plugins like they are installed like this:

cordova plugin add org.apache.cordova.camera
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git

I can update PhoneGap/Cordova like this:

sudo npm update -g phonegap
sudo npm update -g cordova 

But I cannot find how I update the installed plugins when there is a new version or even a new commit in the repository.

How do I update the installed plugins?

Upvotes: 0

Views: 80

Answers (2)

johnborges
johnborges

Reputation: 2553

Remove the plugin first:

cordova plugin rm org.apache.cordova.camera

Then add it back to your project:

cordova plugin add org.apache.cordova.camera

See docs for more details and advanced options. In addition to the standard CLI utility, you can add plugins using plugman.

Upvotes: 1

Kocik
Kocik

Reputation: 504

You can update plugins the same way you install them - just run cordova plugin add again for every plugin you wish to update.

There is no information about updating plugins form cli in documentation, so i guess this is only option.

Upvotes: 0

Related Questions