Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing cordova plugins from the project

Somehow in my app many of the cordova plugins are installed and because of that it requires access to almost everything - from my contacts to current location ( even though this app doesn't need this ).

This app is build via jenkins and as far as I understand one solution is to remove every plugin with single command, so it will be like:

cordova plugin rm org.apache.cordova.battery-status cordova plugin rm org.apache.cordova.camera cordova plugin rm org.apache.cordova.contacts cordova plugin rm org.apache.cordova.geolocation cordova plugin rm org.apache.cordova.media cordova plugin rm org.apache.cordova.media-capture cordova plugin rm org.apache.cordova.splashscreen cordova plugin rm org.apache.cordova.vibration 

But sometimes it shows some errors and with jenkins any error ends up with build failure, so is there any command which deletes all plugins? ( during installation basics plugins which requires any app to work are added automatically via cordova, so I was looking for some cordova plugin rm -all but couldn't find it )

like image 273
mmmm Avatar asked Feb 21 '14 11:02

mmmm


People also ask

How do I remove a plugin from Cordova project?

Removing plugins 'cordova plugin remove cordova-plugin-console' => Removes the console plugin from the project and deletes its entry from config. xml and package. json.


1 Answers

First, you should list your plugins:

cordova plugin list 

With this result, you can simply do:

cordova plugin remove <PLUGIN_NAME> 

For example:

cordova plugin remove org.apache.cordova.media 

Hope it helps.

like image 61
ruhanbidart Avatar answered Oct 14 '22 06:10

ruhanbidart