Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C24910317 for ; Mon, 9 Sep 2013 15:54:10 +0000 (UTC) Received: (qmail 39093 invoked by uid 500); 9 Sep 2013 15:54:10 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 39066 invoked by uid 500); 9 Sep 2013 15:54:10 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 39058 invoked by uid 99); 9 Sep 2013 15:54:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Sep 2013 15:54:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mmocny@google.com designates 209.85.214.174 as permitted sender) Received: from [209.85.214.174] (HELO mail-ob0-f174.google.com) (209.85.214.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Sep 2013 15:54:05 +0000 Received: by mail-ob0-f174.google.com with SMTP id wd6so6065772obb.33 for ; Mon, 09 Sep 2013 08:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=F2C85AlC1Tf9uI8frXYoszqUttzgW6hqL6c6mw2HK0g=; b=i3iQJRUlREno2iufSlAQQt8oUu2QvbT8F3qnFLlRJbbhmIYF/499/GevVEeCTrYMjy 7uqwzCfJbRO3lev1hT2z57BProB2B/mjsiPzNG7K9H2W7nAN7Kp2G89Lvc7rlw+xVsCu zLgMm27SLptA1rjF5xKoFi7rZUU1r4xKfer/YZ/OOvfvj4xNnV0jihhy2DpLA1FwClim lBO5w7wHvm6JG0Ihw8DrJZqvOJI1lfknUPVORbX7x9R95HKz35D+kjZ7u0gm8C4H+oRT iUIT5reEakp41XLwhlV1RY2bUeK1SA3pLBjQaQBmOtZFMeRj0TyCMjuYbIJApowGcb+S WAzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=F2C85AlC1Tf9uI8frXYoszqUttzgW6hqL6c6mw2HK0g=; b=FUs0/PLpJqnE0xx2v0YLi7hA9APKcnNiRuSjUrU3VS7aLQPP9AgQihW6NQ6nCNWLzn Sv5r5xXk10Qwe8RqBsItmJ61G5d71CLeKgvxw27zV11FJI3tRQ19NOJJj6t0w6FerHgb RRwsjVbOZ+fhtVBOeBpBJtRKSIZ2d7WQ5HwSc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=F2C85AlC1Tf9uI8frXYoszqUttzgW6hqL6c6mw2HK0g=; b=CAOvnbqMm1fyG55nZuRm6WOoABRSC7vaMVRSh4FID3WmheDWAT9dwC0Af205/Uppxg nGGSW3oYk64SD7pN6EfpSNV7O26b+k4ivAa29bNNBgdhjQR+Ce5PHOdGZpLf6FVZI8SQ BwKasr2fqlYzjrYYKrKBzIkQIi7vdE0dNJORmNx4MLqYRkine9AYK6Oeu4eUFAGcrSfL 9ZItQ2zdOvexEW27q4x4LbAXOYWaiTQwSP5LbUFGCgBfyXyqlbBWIyvqEssjxoZNmep1 A4iVTQt74PMoPkUjnOmE5Vi6C+j98kb8ALvP6GIjA3cw7uEFWp8srmn5f57pE5Os3+3O T0Rw== X-Gm-Message-State: ALoCoQnzwPnSIIt6sgdY9BfEhibt+md1JTCYoU14I4ZSBmb5Z+LaLqRq97E31wKJpXGW5VTj+wS7Uzncwptan96okJXOSrS4MN4ScCK7ihOTY1IN+HmcTOqnwIfNTs2En7HBo4QMiU5eCQhK+cDHatyPyW7vqj5cegdaK5AN5DxUPLKdgOw2UB5tQSPE7kcMeOXTTyT2xnwGJaFRVUDHVO2JhxG9a/jcDA== X-Received: by 10.60.115.164 with SMTP id jp4mr11580041oeb.19.1378742024988; Mon, 09 Sep 2013 08:53:44 -0700 (PDT) MIME-Version: 1.0 Sender: mmocny@google.com Received: by 10.182.139.100 with HTTP; Mon, 9 Sep 2013 08:53:24 -0700 (PDT) In-Reply-To: References: From: Michal Mocny Date: Mon, 9 Sep 2013 11:53:24 -0400 X-Google-Sender-Auth: 0vurxAS8n2Flq0FfMFYRVlUSYtg Message-ID: Subject: Re: cordova cli global vs. local install To: dev Content-Type: multipart/alternative; boundary=089e01161b46a3039904e5f56422 X-Virus-Checked: Checked by ClamAV on apache.org --089e01161b46a3039904e5f56422 Content-Type: text/plain; charset=ISO-8859-1 Generally, I like it. We've discussed a somewhat variant in the past, and I'm not sure which is better: Instead of installing locally every time a la grunt, we discussed having a single install base for the different cordova versions (i.e. inside ~/.cordova), and then cordova-cli is a short script that forks to launch the right version of cordova proper. The right version is (a) the most recent version if you are creating a new app, or (b) the version that is "tied" to a given workspace when used inside an existing app (and which you must explicitly upgrade). -Michal On Mon, Sep 9, 2013 at 11:48 AM, Carlos Santana wrote: > What does the community think of installing cordova only locally and not > globally? > > # Installing Cordova locally will provide: > > - A way to use different versions of cordova on the same system/os. > - A way to specify cordova as a dependency in package.json for an App > project > - A way to sandbox cordova and checking into source control for an App > project > > # [GruntJS](http://gruntjs.com/getting-started) is a project that already > takes this approach: > > 1. User installs `grunt-cli` globally instead of grunt > npm -g install grunt-cli` > > 2. User installs `grunt` locally > npm install grunt --save-dev > > 3. When user runs `grunt` it will run a short script `/usr/local/bin/grunt` > (about 40 lines) > It will resolve and use grunt from cwd (current working directory) > locally > > # Proposal: > > 1. Have 2 npm packages > - cordova-cli > - cordova > > 2. create cordova-cli package and update docs > cordova-cli will be almost indentical to grunt-cli > https://github.com/gruntjs/grunt-cli/blob/master/bin/grunt > > 3. codova package is not longer get's install as `bin\cordova` and instead > run with > require(cordovapath).cli(); > > > --- > If you want to know more about grunt and why grunt swtiched from being > installed globally to now being install locally a podcast came out last > Friday where the author of GruntJS (Ben Alman) explains more details > http://javascriptjabber.com/074-jsj-grunt-js-with-ben-alman/ > > > -- > Carlos Santana > > --089e01161b46a3039904e5f56422--