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 <[email protected]> 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 <[email protected]> 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 > > >
