cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam George (JIRA)" <>
Subject [jira] [Commented] (CB-5775) Save list of installed plugins and their installed versions in separate json file
Date Mon, 13 Jan 2014 01:20:50 GMT


Adam George commented on CB-5775:

I've just been playing around with Cordova 3.3.0.

There's a new feature in this release where the `platforms/ios/www/cordova_plugins.js` file
that is generated, now has a new "metadata" section in it.

module.exports.metadata = 
    "org.apache.cordova.console": "0.2.4",
    "org.apache.cordova.device": "0.2.4",
    "org.apache.cordova.dialogs": "0.2.3",
    "org.apache.cordova.globalization": "0.2.3",
    "": "0.2.4",
    "org.apache.cordova.splashscreen": "0.2.4",
    "com.phonegap.plugins.barcodescanner": "1.0.1"

I guess that sort of is what I'm talking about.  Although, I would have thought putting that
outside of the the `platforms` directory was a better idea.  Currently it's duplicated for
each platform you have and means you cant easily just add `platforms` to your .gitignore.

No idea either if there is some new "bundle install" type command that can re-install the
plugins in that list when doing a fresh checkout either.

Would be good to hear some information on how this will work in future cordova versions.

> Save list of installed plugins and their installed versions in separate json file
> ---------------------------------------------------------------------------------
>                 Key: CB-5775
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 3.3.0
>            Reporter: Adam George
> There's a major piece of the puzzle missing from the package management capabilities
of the CLI, that I haven't seen any discussion/info on yet.
> So I'm sorry if this is already planned, but I've searched around and can't see anything.
> There doesn't appear to be anything in cordova that saves the list of installed plugins
and their installed version.
> Ideally I should be able to install a plugin, i.e. 
>     cordova plugin add
> And some sort of "plugins.json" file should be created/updated, specifying that the plugin
was installed at version 3.0.0.
> (like what NPM or bower do with components.json/bower.json)
> That file only (and not any of the "artefacts" or vendor code in the `plugins` directory)
should be version controlled.
> I should then be able to checkout my code from version control into a fresh location
and run some sort of command like
>     cordova plugin install
> or something, which would go through the plugins.json file and ensure they have all been
installed at the versions specified.
> I'm assuming this is on the radar of things to do for the CLI, because it's pretty standard
fare for package management functionality.
> For me, this is a high sort of priority, because currently using cordova CLI with version
control sucks and is a pain when working with multiple developers.
> I currently have to version control both the `platforms` and `plugins` directories, despite
them being "build artefacts" of the CLI  -  because there is no current way to check the code
out from version control and have the CLI re-build everything correctly.
> I'd love to not have to store all that redundant 3rd party code in my repo, and having
a `bundle install` like ability would make it so much easier when working with multiple people
on a cordova project.

This message was sent by Atlassian JIRA

View raw message