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 7B172F6D9 for ; Fri, 22 Mar 2013 22:04:06 +0000 (UTC) Received: (qmail 17720 invoked by uid 500); 22 Mar 2013 22:04:06 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 17687 invoked by uid 500); 22 Mar 2013 22:04:06 -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 17671 invoked by uid 99); 22 Mar 2013 22:04:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Mar 2013 22:04:05 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of brian.leroux@gmail.com designates 209.85.223.169 as permitted sender) Received: from [209.85.223.169] (HELO mail-ie0-f169.google.com) (209.85.223.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Mar 2013 22:04:01 +0000 Received: by mail-ie0-f169.google.com with SMTP id qd14so3985584ieb.14 for ; Fri, 22 Mar 2013 15:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=HMp3e0dZ8qQ7HkZt1zdGlHwhVJVVHjgSZ4qchk05gc4=; b=IH0nmuRP4g2ZNUSfOXEwp046EM+x7Bgbl+FA38C+VPpG6FZTs/hUTMPerAJjjvbX4Y DY4Y2h4fzT2g2yb80s3Z6HpSmgc/yDAAlLAHDieXKWo8VVAt7Skk/oqRX/lIMJBu02Du a8/O4EgOufRU8fVSdNNAROmLliDiCbmqBrZFgBbXkuNJZnkR8MKHTDiS2hMNTZnbzMUI XtPMYG3OpyupSDqZEU6NidWFizIWatvsVUJlZpK70uf9zlvrAA2zock4jlAR9F1VXkxN rphw8Jkpi0gUYF4Bo6tSDWRJwXgcpFWHllIxF0CH//Yh9EnzQbT9ofJ0yIMFbD7spWn2 g1qA== MIME-Version: 1.0 X-Received: by 10.50.87.2 with SMTP id t2mr2366929igz.19.1363989821019; Fri, 22 Mar 2013 15:03:41 -0700 (PDT) Sender: brian.leroux@gmail.com Received: by 10.50.156.225 with HTTP; Fri, 22 Mar 2013 15:03:40 -0700 (PDT) In-Reply-To: References: Date: Fri, 22 Mar 2013 15:03:40 -0700 X-Google-Sender-Auth: 0PNFPQsYIAJkc2oF-PRAtkdld8Y Message-ID: Subject: Re: Platform-level command line scripts ;) From: Brian LeRoux To: dev@cordova.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org YES. Do it. On Fri, Mar 22, 2013 at 2:38 PM, Filip Maj wrote: > Hai gaiz! > > Main contention between the two "camps" in this debate is four vs eight > scripts.. But Brian points out that refactoring smaller bits of > functionality into their own script allows us to "have our cake and eat i= t > too". This, in turn, results in four + (a subset of the 8) =3D 10 scripts= in > total.. Which is an argument for just starting with smaller more discrete > scripts to begin with, lol. > > How about this as a middle ground: > > - under /cordova/ we have the four scripts Anis/Andrew recommend: clean, > log, build and run. These call into various scripts under cordova/lib, > such as.. > - under /cordova/lib we have the ~6 scripts I recommended: build-debug, > build-release, start-emulator, deploy-device, deploy-emulator, and > possibly a list-devices one as well. > > The final point is nailing what `run` does, step-by-step. Paraphrasing > Anis: > > If device(s) connected: > * Pick device (ignore emulators). > * Prompt, timeout and pick first one (5 to 10 seconds) if multiple device= s > are connected (ignore emulators). > > If device(s) not connected: > * Emulator if it is running > * Prompt, timeout and pick first one (5 to 10 seconds) if multiple > emulators are running. > * Start emulator. If you have multiple ones set up (Android's case), > prompt, timeout and launch first one (5 to 10 seconds). > > Yes/no/discuss. Let's try to get to a consensus :) > > > On 3/21/13 5:29 PM, "Brian LeRoux" wrote: > >>I knew you'd bring that up! We'll talk more tmrw. >> >>On Thu, Mar 21, 2013 at 4:40 PM, Anis KADRI wrote: >>> =C5=A0or you can have functions do discrete actions like so: >>> >>> >>>https://git-wip-us.apache.org/repos/asf?p=3Dcordova-android.git;a=3Dblob= ;f=3Dbi >>>n/templates/cordova/cordova;h=3D1945a4c45f835a6eab3836c4154e518b902d88c6= ;hb >>>=3DHEAD >>> >>> =C5=A0instead of creating more inodes. >>> >>> >>> On Thu, Mar 21, 2013 at 4:30 PM, Brian LeRoux wrote: >>> >>>> > You could make more scripts as helper scripts, but I still think >>>>that it >>>> > will be confusing if a user types "ls" and sees a large number of >>>> scripts, >>>> > having to guess what each of them does. >>>> >>>> Put them in a subdir called ./lib and be done w/ it. >>>> >>>> >>>> > I don't think having more scripts will make it more likely that the >>>> scripts >>>> > will be consistent across platforms. >>>> >>>> Ah, but having smaller responsibilities for a module of code makes it >>>> more testable in discreet form making it easier to confirm said >>>> suspicions. >>>> >