cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: [cordova-cli] versioning
Date Mon, 25 Mar 2013 22:18:03 GMT
Really like this. It a) slims down the cli tools by lazy loading the
libraries as they are needed and b) solves the upgrade/downgrade story,
since eventually you'll be able to simply change the version of the
cordova npm dependency at a project-level.

The only "downside" (not really) is that every generated cordova-cli
project now is implicitly an npm project as it needs a package.json at the

On 3/25/13 11:06 AM, "Michael Brooks" <> wrote:

>+1 to locking the CLI to a version
>+1 to the Grunt vision
>However, I'd like to propose a different approach to the CLI versioning
>it can also solve the `create` command issue to help move towards a dumb
>global `cordova`.
>## Cordova-CLI
>- npm version is still associated with a Cordova distribution
>- Cordova-CLI does not vendor the Cordova distribution
>- Adding a platform will lazy load the platform distribution into
>    - We can lazy load by downloading a gzip from the Apache Git web
>- Next time the platform is needed, it is copied from
>## Cordova Create
>- Creating an app should be a lazy load of the Hello World app
>   - Cached in ~/.cordova/app/<name>-<version>/
>- We can update the Hello World app to match a standard Cordova CLI
>- Now the global Cordova CLI is a dumb tool
>   - On create: lazy loading or copying the hello world app
>   - On project command: shelling to ./node_modules/bin/cordova <command>
>On Fri, Mar 22, 2013 at 1:08 PM, Filip Maj <> wrote:
>> As Tommay pointed out, you need to create the cordova project structure
>> the first place with some manner of tool..
>> On 3/22/13 11:58 AM, "tommy-carlos Williams" <> wrote:
>> >I don't have much to add except that I really like this about Grunt.
>> >
>> >However, it would get "interesting" with Cordova since the global is
>> >creates a project in the first place. I still think it could work and
>> >have the global only responsible for creating dirs and setting up
>> >package.json stuff etc...
>> >
>> >+1 for looking into this.
>> >
>> >On 23/03/2013, at 4:53, Brian LeRoux <> wrote:
>> >
>> >> Right now the global executable is version locked to a Cordova
>> >> release. If you have a project running 2.5 you are required to have
>> >> Cordova/CLI 2.5. If you need to then work in Cordova 2.4 you need to
>> >> downgrade (not really but you would to be safe).
>> >>
>> >> In Grunt .4 the global executable is dumb. It just shells to locally
>> >> installed ./node_module version of Grunt. This enables project level
>> >> versioning of Grunt. Nice feature. We can do the same thing: with the
>> >> caveat that you would then require a package.json and ./node_modules
>> >> folder in our Cordova projects.
>> >>
>> >> Discuss.

View raw message