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 AF21D18400 for ; Sat, 5 Dec 2015 15:01:13 +0000 (UTC) Received: (qmail 9055 invoked by uid 500); 5 Dec 2015 15:01:13 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 9022 invoked by uid 500); 5 Dec 2015 15:01:13 -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 9010 invoked by uid 99); 5 Dec 2015 15:01:13 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Dec 2015 15:01:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 9054AC0BE2 for ; Sat, 5 Dec 2015 15:01:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.401 X-Spam-Level: *** X-Spam-Status: No, score=3.401 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, KAM_LOTSOFHASH=0.25, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id oW1EWC1uEdoj for ; Sat, 5 Dec 2015 15:00:58 +0000 (UTC) Received: from mail-vk0-f50.google.com (mail-vk0-f50.google.com [209.85.213.50]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 07EDE42AA8 for ; Sat, 5 Dec 2015 15:00:58 +0000 (UTC) Received: by vkay187 with SMTP id y187so81337143vka.3 for ; Sat, 05 Dec 2015 07:00:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=b85vo01NJfVrOrYAWoUi56T4U/TtOdWIDO6B+/AQyd0=; b=GJ7k7BgdVB1brXNvn/rT3xNblJw2Km6btJl++FBAanLnUwAuZc6J/1y+/frMf/veYr FHTuzxWV8BiUc/TjKUzSDTtdEFlndKkR0AsEK4M7i9XEMa+jrjndIafI18hxF+OOOILV kV40yy59oFhpDqDFMbYKk1Y8N5YetKu08vhDn0I7MfD4T6JdTvribwvT40mp27X5NjjY gZ+Z+m6bC5uhbOOQQJzVIw9j3Zceolu8x7KPASQ55nc4NbiMeayUYUmFFJCpvRfOhrXd Rx44B9q30wFQHF/WPPg7x5z6qoTNKg0nzV1S65XyeWA+ZQSUchrX30VzluGFCT6bdhhd EnNw== X-Received: by 10.31.146.66 with SMTP id u63mr12907302vkd.31.1449327657443; Sat, 05 Dec 2015 07:00:57 -0800 (PST) MIME-Version: 1.0 References: <35538573-9482-4874-9EB4-8D7EC07A5655@gmail.com> In-Reply-To: From: Carlos Santana Date: Sat, 05 Dec 2015 15:00:48 +0000 Message-ID: Subject: Re: [DISCUSS] CLI Templates To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=001a1143a94c2f6629052627e465 --001a1143a94c2f6629052627e465 Content-Type: text/plain; charset=UTF-8 The email thread has the details but in summary: It doesn't handle npm and git as source It doesn't copy everything By adding npm and git having the flag copy-from it's confusing. On Fri, Dec 4, 2015 at 9:04 PM Dmitry Blotsky wrote: > Hey folks. Sorry I'm late to the party, but why is `--copy-from` not > sufficient? > > Kindly, > Dmitry > > -----Original Message----- > From: Carlos Santana [mailto:csantana23@gmail.com] > Sent: Friday, December 4, 2015 10:09 AM > To: dev@cordova.apache.org > Subject: Re: [DISCUSS] CLI Templates > > Michael we will love to hear your feedback, and we can improve on top of > what's initially there. > > > On Fri, Dec 4, 2015 at 1:04 PM Carlos Santana > wrote: > > > Michael > > Links to PRs where available for a while on the proposal. > > > > https://github.com/apache/cordova-lib/pull/339 > > https://github.com/apache/cordova-cli/pull/226 > > > > > > On Fri, Dec 4, 2015 at 11:33 AM Michael Brooks > > > > wrote: > > > >> I'd love to see a pull request rather than a straight up merge, since > >> the template discussion was more involved. Also, I'm really looking > >> forward to seeing your work on this! > >> > >> On Thu, Dec 3, 2015 at 9:47 AM, Carlos Santana > >> wrote: > >> > >> > I will be working later today with James from my team on merging > >> > initial implementation of --template. it will update a few repos > >> > (cli, lib, doc) > >> > > >> > Anyone oppose? > >> > > >> > > >> > On Fri, Nov 13, 2015 at 1:50 PM Carlos Santana > >> > > >> > wrote: > >> > > >> > > alias, deprecate and later remove > >> > > > >> > > On Fri, Nov 13, 2015 at 1:49 PM Carlos Santana > >> > > > >> > > wrote: > >> > > > >> > >> I agree, --template is the new --copy-from :-) > >> > >> > >> > >> > >> > >> On Fri, Nov 13, 2015 at 1:48 PM Shazron wrote: > >> > >> > >> > >>> Well, we could deprecate --copy-from, and alias --template to it. > >> But > >> > >>> we shouldn't have both, it should just be one implementation. > >> > >>> > >> > >>> On Fri, Nov 13, 2015 at 10:45 AM, Carlos Santana < > >> csantana23@gmail.com > >> > > > >> > >>> wrote: > >> > >>> > In some way we we are enhancing --copy-from > >> > >>> > > >> > >>> > I'm OK to the copy blindly even plugins and platforms, I was > >> trying > >> > to > >> > >>> > avoid people creating templates when is not need it if they > >> already > >> > >>> have > >> > >>> > platforms and plugins > >> > >>> > But I'm OK if we want to allow it, but I would not documented > >> > >>> > :-) > >> it > >> > >>> just > >> > >>> > happens to work > >> > >>> > > >> > >>> > but I don't like the "--copy-from" name, I want to use > >> "--template" > >> > >>> that > >> > >>> > takes path, giturl, and npm name > >> > >>> > > >> > >>> > > >> > >>> > On Fri, Nov 13, 2015 at 1:41 PM Carlos Santana < > >> csantana23@gmail.com > >> > > > >> > >>> wrote: > >> > >>> > > >> > >>> >> What dynamic nature you want ? > >> > >>> >> > >> > >>> >> I think using yeoman is bad idea, we tried at work at is a > >> > >>> >> huge > >> > >>> dependency > >> > >>> >> in terms of foot print and number of dependencies. > >> > >>> >> We then learned that just using the inquirer npm package > >> > >>> >> gave us > >> > what > >> > >>> we > >> > >>> >> wanted to create an interactive experience in the CLI > >> > >>> >> > >> > >>> >> At least the first implementation I want to keep it simple, > >> > >>> >> but > >> you > >> > >>> >> brought a good point about dynamic. > >> > >>> >> > >> > >>> >> I will update proposal, add that if user passed any of the > >> optional > >> > >>> >> arguments for create like app-id, app-name, or app-version > >> > >>> >> they > >> > >>> replace the > >> > >>> >> ones in the template. > >> > >>> >> > >> > >>> >> I will double check with James to see if already implemented > >> this in > >> > >>> his > >> > >>> >> current PR, if not then will added. > >> > >>> >> > >> > >>> >> It terms of dynamic I think after we get the first > >> > >>> >> implementation > >> > >>> out, I > >> > >>> >> would like to enhance on top of it with allowing the > >> > >>> >> template to > >> > have > >> > >>> >> scripts that can run > >> > >>> >> like before_create and after_create, then the template can > >> specify > >> > >>> this in > >> > >>> >> the scripts object of the package.json and cordova cli just > runs. > >> > >>> This way > >> > >>> >> template owner can run what ever they want even inquirer to > >> > >>> >> ask > >> > >>> questions > >> > >>> >> to user for additional things to setup with the template. > >> > >>> >> > >> > >>> >> > >> > >>> >> [1]: > >> > >>> >> https://na01.safelinks.protection.outlook.com/?url=https%3a% > >> > >>> >> 2f%2fwww.npmjs.com%2fpackage%2finquirer&data=01%7c01%7cdblot > >> > >>> >> sky%40microsoft.com%7c9fb3634d35ba45cd7a7508d2fcd60177%7c72f > >> > >>> >> 988bf86f141af91ab2d7cd011db47%7c1&sdata=cGhgCrxXQToX3DsPn2Om > >> > >>> >> UCsTQtcWl11IjuPpgRdFlco%3d > >> > >>> >> > >> > >>> >> > >> > >>> >> > >> > >>> >> > >> > >>> >> > >> > >>> >> On Thu, Nov 12, 2015 at 1:56 PM Parashuram N < > >> > panarasi@microsoft.com> > >> > >>> >> wrote: > >> > >>> >> > >> > >>> >>> ReactNative init does use yeoman - that is a good idea !! > >> However, > >> > >>> does > >> > >>> >>> that mean that we need to depend on Yeoman also ? Does it > >> > >>> >>> make > >> > sense > >> > >>> to > >> > >>> >>> simply have a separate yeoman generator ? > >> > >>> >>> > >> > >>> >>> > >> > >>> >>> > >> > >>> >>> > >> > >>> >>> On 11/12/15, 10:10 AM, "Gorkem Ercan" > >> > >>> >>> > >> > >>> wrote: > >> > >>> >>> > >> > >>> >>> > > >> > >>> >>> >How about adding support for some more dynamic generation. > >> > >>> >>> >Can we add yeoman as an option something like $cordova > >> > >>> >>> >create > >> > myApp > >> > >>> >>> >--template=yo:m > >> > >>> >>> >to invoke the generator m ? > >> > >>> >>> >-- > >> > >>> >>> >Gorkem > >> > >>> >>> > > >> > >>> >>> >On 10 Nov 2015, at 19:52, Carlos Santana wrote: > >> > >>> >>> > > >> > >>> >>> >> Parashuram > >> > >>> >>> >> > >> > >>> >>> >> I would say that if they have "platforms" and "plugins" > >> > >>> >>> >> it's > >> not > >> > >>> >>> >> consider a > >> > >>> >>> >> template, its consider a cordova project ready to be use > >> > >>> >>> >> no > >> need > >> > >>> to > >> > >>> >>> >> run > >> > >>> >>> >> create on it. > >> > >>> >>> >> > >> > >>> >>> >> As far as cp-from, it's doesn't copy much only www and > >> > >>> config.xml, I > >> > >>> >>> >> didn't > >> > >>> >>> >> want to change it's behavior for backwards > >> > >>> >>> >> compatibility. I > >> > think > >> > >>> it > >> > >>> >>> >> will > >> > >>> >>> >> be good to mark it deprecated for a certain period of > >> > >>> >>> >> time, > >> > >>> >>> >> > >> > >>> >>> > > >> > >>> >>> >+1 for deprecating the copy-from. > >> > >>> >>> > > >> > >>> >>> >> > >> > >>> >>> >> On Tue, Nov 10, 2015 at 5:19 PM Parashuram N < > >> > >>> panarasi@microsoft.com> > >> > >>> >>> >> wrote: > >> > >>> >>> >> > >> > >>> >>> >>> Yes, they would. However, there could be cases where > >> > >>> >>> >>> folks > >> > would > >> > >>> like > >> > >>> >>> >>> to > >> > >>> >>> >>> have templates that have changes stuff in platforms, or > >> added > >> > >>> custom > >> > >>> >>> >>> plugins or hooks. I think that instead of adding extra > >> > >>> >>> >>> code > >> to > >> > >>> >>> >>> prevent all > >> > >>> >>> >>> these things, we keep things simple, and copy over > >> everything. > >> > >>> The > >> > >>> >>> >>> templates can then decide what they want to do, and > >> > >>> >>> >>> most of > >> > them > >> > >>> will > >> > >>> >>> >>> not > >> > >>> >>> >>> bundle plugins or platforms. > >> > >>> >>> >>> > >> > >>> >>> >>> -----Original Message----- > >> > >>> >>> >>> From: Steven Gill [mailto:stevengill97@gmail.com] > >> > >>> >>> >>> Sent: Tuesday, November 10, 2015 2:16 PM > >> > >>> >>> >>> To: dev@cordova.apache.org > >> > >>> >>> >>> Subject: Re: [DISCUSS] CLI Templates > >> > >>> >>> >>> > >> > >>> >>> >>> If the plugins and platforms are listed in config.xml, > >> wouldn't > >> > >>> they > >> > >>> >>> >>> just > >> > >>> >>> >>> get fetched on prepare? > >> > >>> >>> >>> > >> > >>> >>> >>> On Tue, Nov 10, 2015 at 2:09 PM, Parashuram N > >> > >>> >>> >>> > >> > >>> >>> >>> wrote: > >> > >>> >>> >>> > >> > >>> >>> >>>> I think it should copy platform and plugins folders, > >> > >>> >>> >>>> if > >> those > >> > >>> are a > >> > >>> >>> >>>> part of the template. I think the guidance should be > >> > >>> >>> >>>> that > >> most > >> > >>> >>> >>>> templates should not include a platform or a plugin > >> > >>> >>> >>>> folder, > >> > but > >> > >>> if > >> > >>> >>> >>>> they do - for reasons like custom plugins, etc, then > >> > >>> >>> >>>> we > >> should > >> > >>> let > >> > >>> >>> >>>> that happen. The only enhancement from --copy-from > >> > >>> >>> >>>> would be > >> > >>> that we > >> > >>> >>> >>>> also > >> > >>> >>> >>> support npm and git URLs. > >> > >>> >>> >>>> > >> > >>> >>> >>>> -----Original Message----- > >> > >>> >>> >>>> From: Carlos Santana [mailto:csantana23@gmail.com] > >> > >>> >>> >>>> Sent: Tuesday, November 10, 2015 1:26 PM > >> > >>> >>> >>>> To: dev@cordova.apache.org > >> > >>> >>> >>>> Subject: Re: [DISCUSS] CLI Templates > >> > >>> >>> >>>> > >> > >>> >>> >>>> Parashuram > >> > >>> >>> >>>> > >> > >>> >>> >>>> The template doesn't any special structure, the > >> > >>> >>> >>>> current > >> hello > >> > >>> app in > >> > >>> >>> >>>> npm is already a template > >> > >>> >>> >>>> > >> > >>> >>> >>>> Will add comment in PR about having fixtures in tests > >> > >>> >>> >>>> for > >> > >>> different > >> > >>> >>> >>>> uses cases with different type of templates > >> > >>> >>> >>>> > >> > >>> >>> >>>> The code copies everything except plugins and > >> > >>> >>> >>>> platforms > >> > >>> directories, > >> > >>> >>> >>>> maybe it needs some comments to make it more clear > >> > >>> >>> >>>> > >> > >>> >>> >>>> It should copy dot files like .gitignore, > >> > >>> >>> >>>> .editorconfig, > >> > >>> .bowerrc > >> > >>> >>> >>>> Very > >> > >>> >>> >>>> important at least for me .gitignore, it helps when > >> > >>> >>> >>>> folks > >> ask > >> > if > >> > >>> >>> >>>> they > >> > >>> >>> >>>> should ignore platforms and plugins from source > >> > >>> >>> >>>> control and > >> > the > >> > >>> >>> >>>> answer > >> > >>> >>> >>>> is always YES. If they are asking then it means they > >> > >>> >>> >>>> need > >> the > >> > >>> >>> >>>> advise. > >> > >>> >>> >>>> > >> > >>> >>> >>>> > >> > >>> >>> >>>> On Tue, Nov 10, 2015 at 3:27 PM Parashuram N > >> > >>> >>> >>>> > >> > >>> >>> >>>> wrote: > >> > >>> >>> >>>> > >> > >>> >>> >>>>> +1 to the proposal. > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> Is there a structure of a sample template ? Also, the > >> > >>> >>> >>>>> code > >> > >>> seems to > >> > >>> >>> >>>>> copy everything from npm or the gitURL, though in the > >> > proposal > >> > >>> you > >> > >>> >>> >>>>> say that dot file and hooks/platforms should not be > >> copies. > >> > >>> Should > >> > >>> >>> >>>>> we talk about that in the proposal too ? > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> -----Original Message----- > >> > >>> >>> >>>>> From: Raymond Camden [mailto:raymondcamden@gmail.com] > >> > >>> >>> >>>>> Sent: Tuesday, November 10, 2015 12:01 PM > >> > >>> >>> >>>>> To: dev@cordova.apache.org > >> > >>> >>> >>>>> Subject: Re: [DISCUSS] CLI Templates > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> Yeah, nothing to add here but +1. > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> Oh, the only thing I'd add is that I wish there was a > >> > >>> >>> >>>>> way > >> to > >> > >>> >>> >>>>> *permanently* set a template. I hate the default > >> > >>> >>> >>>>> Cordova > >> > >>> template > >> > >>> >>> >>>>> (sorry > >> > >>> >>> >>>>> ;) and would love to make the CLI always use my own > >> > particular > >> > >>> >>> >>> template. > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> On Tue, Nov 10, 2015 at 1:52 PM, Ryan J. Salva > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> wrote: > >> > >>> >>> >>>>>> I love it! > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> rjs > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> Ryan J. Salva | Principal Program Manager Lead > >> > >>> >>> >>>>>> Visual > >> > Studio > >> > >>> >>> >>>>>> Tools for Apache Cordova rsalva@microsoft.com > >> > >>> >>> >>>>>> 206 612 5079 mobile > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> -----Original Message----- > >> > >>> >>> >>>>>> From: Carlos Santana [mailto:csantana23@gmail.com] > >> > >>> >>> >>>>>> Sent: Tuesday, November 10, 2015 7:49 PM > >> > >>> >>> >>>>>> To: dev@cordova.apache.org > >> > >>> >>> >>>>>> Subject: [DISCUSS] CLI Templates > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> From the Face2Face meeting updating the cordova cli > >> > >>> >>> >>>>>> to > >> work > >> > >>> with > >> > >>> >>> >>>>>> templates sounded like a good feature to add to the > >> > >>> >>> >>>>>> CLI > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> I finally got around to this and created the > >> > >>> >>> >>>>>> proposal and > >> > got > >> > >>> >>> >>>>>> James > >> > >>> >>> >>>>> Dubee from our team to take a stab at implementation. > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> CLI-Template proposal [1] > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> [1]: > >> > >>> >>> >>>>>> > >> > >>> https://github.com/cordova/cordova-discuss/blob/master/proposal > >> > >>> s/C > >> > >>> >>> >>>>>> LI > >> > >>> >>> >>>>>> -T > >> > >>> >>> >>>>>> > >> > >>> https://na01.safelinks.protection.outlook.com/?url=emplates.md& > >> > >>> dat > >> > >>> >>> >>>>>> a= > >> > >>> >>> >>>>>> 01%7c01%7cpanarasi%40microsoft.com > >> > >>> %7ce586e8f64dae4418c1b708d2ea158 > >> > >>> >>> >>>>>> 9e > >> > >>> >>> >>>>>> > >> > >>> d%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=kctEUezjtECUIvZQ > >> > >>> cih > >> > >>> >>> >>>>>> bu > >> > >>> >>> >>>>>> uydWn7HfTJO8c7W0LTz98U%3d > >> > >>> >>> >>>>>> > >> > >>> >>> >>>>>> --Carlos > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> -- > >> > >>> >>> >>>>> > >> > >>> =============================================================== > >> > >>> ===== > >> > >>> >>> >>>>> == ===== Raymond Camden, Developer Advocate for > >> MobileFirst > >> > at > >> > >>> IBM > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> Email : raymondcamden@gmail.com Blog : > >> > >>> >>> >>>>> > >> > >>> >>> > >> > https://na01.safelinks.protection.outlook.com/?url=www.raymondcamde > >> > n > >> > >>> >>> >>>>> .c > >> > >>> >>> >>>>> om&data=01%7c01%7cpanarasi%40microsoft.com > >> > >>> >>> %7c92e5feab0e524d2dbc8008d > >> > >>> >>> >>>>> 2e > >> > >>> >>> >>>>> > >> > >>> a09af88%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=xMtq2oC%2b > >> > >>> %2b%2 > >> > >>> >>> >>>>> fB > >> > >>> >>> >>>>> bNlOcIKlStSkgUUuiGDKbq7KuNMHLiVU%3d > >> > >>> >>> >>>>> Twitter: raymondcamden > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> > >> > >>> --------------------------------------------------------------- > >> > >>> ----- > >> > >>> >>> >>>>> - To unsubscribe, e-mail: > >> dev-unsubscribe@cordova.apache.org > >> > >>> >>> >>>>> For additional commands, e-mail: > >> dev-help@cordova.apache.org > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> > >> > >>> >>> >>>>> > >> > >>> --------------------------------------------------------------- > >> > >>> ----- > >> > >>> >>> >>>>> - To unsubscribe, e-mail: > >> dev-unsubscribe@cordova.apache.org > >> > >>> >>> >>>>> For additional commands, e-mail: > >> dev-help@cordova.apache.org > >> > >>> >>> >>>>> > >> > >>> >>> >>>> > >> > >>> >>> >>> > >> > >>> >>> > > >> > >>> >>> > >> > >>> > >> >-------------------------------------------------------------------- > >> >- > >> > >>> >>> >To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > >> > >>> >>> >For additional commands, e-mail: > >> > >>> >>> >dev-help@cordova.apache.org > >> > >>> >>> > > >> > >>> >>> > >> > >>> >> > >> > >>> > >> > >>> > >> --------------------------------------------------------------------- > >> > >>> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org > >> > >>> For additional commands, e-mail: dev-help@cordova.apache.org > >> > >>> > >> > >>> > >> > > >> > > > --001a1143a94c2f6629052627e465--