cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mefire O. <>
Subject platforms/plugins save and restore from config.xml
Date Thu, 08 Jan 2015 22:29:09 GMT
Hi all,

I am a big fan of the experimental "save" and "restore" features that are in the CLI and saw
that Gorkem has also created another PR ( )
to have a setting to auto persist/restore plugin versions which is a really interesting idea.
 On a related note, one issue I ran into with platform save/restore is when you need to involve
multiple operating systems for a given project.  Ex: Targeting say iOS, Windows, and Ubuntu
from the same project or simply have some team members on OSX or Linux while others are on
Windows - you need to be able to "save" or "restore" only platforms that run on the OS you
are currently using.

For the restore situation, it seems to make quite a bit of sense to use any version information
in config.xml when you add a platform by default.  The fact the information in is in config.xml
indicates the goal is consistency.

Here is a PR that adds this functionality for platforms:

With that in mind, we could also follow that familiar pattern that exists with npm and package.json
to help out when you want to quickly save the platform you added to config.xml.


cordova platform add android --save

...adds the latest android platform and updates config.xml with the version that was added.
As always, you can always use the existing syntax to add a different version (cordova platform
add android@4.0.0<mailto:android@4.0.0>). I'm planning on putting together a PR on that
idea as well.  We could actually follow a similar model for plugins as well.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message