4

Let's say I've install some plugins in cordova, and it has been recoded in config.xml:

<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<plugin name="cordova-plugin-file" spec="^4.3.3" />
<plugin name="cordova-plugin-file-transfer" spec="^1.6.3" />
<plugin name="cordova-plugin-geolocation" spec="^4.0.1" />

Now, if I delete the plugins folder, how can I reinstall all the plugins easily?

I don't have to type all the cordova add plugin order, do I?

cordova plugin add cordova-plugin-camera

cordova plugin add cordova-plugin-file

And so on.

Halt
  • 1,055
  • 9
  • 18

1 Answers1

10

Just run cordova prepare

It should recreate all the plugins and platforms from the config.xml

But if you deleted the plugins folder, they are also in the platforms folder and plugins will fail to install, so delete platforms folder too.

jcesarmobile
  • 51,328
  • 11
  • 132
  • 176