Halt
Halt

Reputation: 1135

how to reinstall plugins already recoded in config.xml in cordova?

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.

Upvotes: 5

Views: 7635

Answers (1)

jcesarmobile
jcesarmobile

Reputation: 53351

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.

Upvotes: 11

Related Questions