The use case I was initially addressing with that utility was a developer
wanting multiple versions of Cordova on one machine. In that case it makes
more sense to use multiple local installations than to install globally.

On Wed, Jan 21, 2015 at 4:39 PM, Ross Gerbasi <rgerb...@gmail.com> wrote:

> Very helpful information, as for why you would want to do this, I was more
> just bringing out the question of Is this something even worth doing? The
> gulp workflow looks great, I like the simplicity and control there.
>
> As mentioned there would still be shared global settings and cache, is
> there really a good reason to not install cordova globally?
>
>
>
> On Wed, Jan 21, 2015 at 1:22 PM, Tommy Williams <to...@devgeeks.org>
> wrote:
>
> > The desire to pin the CLI is probably just legacy from when the CLI was
> > tied more tightly to the platform versions.
> > On 22/01/2015 8:17 am, "Michal Mocny" <mmo...@chromium.org> wrote:
> >
> > > ..also regarding "create" not working for current folder.. the only
> > > requirements are that the current folder has the right directory
> > > structure.  Namely, if you already have a www/ folder and config.xml
> file
> > > with a valid format, you can just "cordova platform add .." and get to
> > > work.
> > >
> > > So, you can:
> > > - git clone CordovaProject.git   # or do whatever else to get the stub
> > of a
> > > project
> > > - npm init
> > > - npm install cordova
> > > - ./node_modules/cordova/bin/cordova platform add android
> > >
> > > etc.  Now I agree that that las line is a mouthful, so you can use the
> > > cordova-local utility I mentioned.  Also, while this does give you
> > > different cordova-cli versions per project, they will still share
> global
> > > settings and cache, and I'm not aware of a way to disable that.
> Finally,
> > > why do you want to pin the cli version?  You can pin the platform
> > versions
> > > and use the latest CLI usually without ill effects and often with
> useful
> > > updates.
> > >
> > > -Michal
> > >
> > > On Wed, Jan 21, 2015 at 4:10 PM, Michal Mocny <mmo...@chromium.org>
> > wrote:
> > >
> > > > There was also a recent mailing list thread here about a
> cordova-local
> > > > utility someone wrote, which supports installing cordova-cli's
> locally
> > > > within projects and calling into them automatically from a wrapper.
> I
> > > > haven't tried it, but it could be a more similar workflow to the
> > standard
> > > > cordova-cli workflow than what Mark suggests (though Marks has other
> > > > advantages).
> > > >
> > > > On Wed, Jan 21, 2015 at 3:47 PM, Mark Koudritsky <kam...@google.com>
> > > > wrote:
> > > >
> > > >> The best known example of how to use local installs of command line
> > > tools
> > > >> is probably Grunt, a globally installed binary will always look for
> > and
> > > >> invoke a local installation.
> > > >> I'm also experimenting with a Gulp based workflow for Cordova which
> > uses
> > > >> local installs of cordova-lib and cordova-android/ios.
> > > >> https://github.com/kamrik/CordovaGulpTemplate
> > > >>
> > > >> On Wed, Jan 21, 2015 at 3:12 PM, Ross Gerbasi <rgerb...@gmail.com>
> > > wrote:
> > > >>
> > > >> > Hey gang,
> > > >> >
> > > >> > I have been poking around with trying to come up with a workflow
> > that
> > > >> does
> > > >> > not require installing cordova or phonegap globally. I haven't
> been
> > > >> able to
> > > >> > come up with anything and I wanted to see if i am missing
> something,
> > > was
> > > >> > this ever a goal, should it be a goal we work to add into the
> > package?
> > > >> >
> > > >> > Cordova for iOS also requires ios-deploy/ios-sim to be installed
> > > >> globally
> > > >> > which would be awesome if we didn't need to do that.
> > > >> >
> > > >> > I feel we need a couple things to make this happen. First would be
> > > some
> > > >> > kind of npm-exec command added to node itself. Much like what is
> > > >> provided
> > > >> > by this package
> > > >> >
> > > >> > https://www.npmjs.com/package/npm-exec
> > > >> >
> > > >> > This would allow us to do something like npm exec corodva and run
> > our
> > > >> > binary from the local folder. Currently this seems to only be
> > enabled
> > > >> when
> > > >> > running scripts. Now we can always do this via
> > > >> ./node_modules/bin/cordova
> > > >> > also but its certainly not as pretty. This would also give us a
> way
> > to
> > > >> run
> > > >> > ios-deploy via the local bin folder.
> > > >> >
> > > >> > Second is a hard stop we have when trying to generate a package
> > into a
> > > >> > folder with existing content. So for example if I make a folder
> > called
> > > >> > TestApp and npm install cordova into that folder. If I attempt to
> > run
> > > >> > "./node_modules/cordova create ." we get the warning that the
> folder
> > > >> > contains stuff.
> > > >> >
> > > >> > So I guess I am mainly curious what people think, locally install
> > > >> packages
> > > >> > seems to be preferable to a lot of people. Does anyone have any
> > strong
> > > >> > opinions or other ideas on how to achieve this?
> > > >> >
> > > >> > -ross
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
>

Reply via email to