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 53CF9D557 for ; Tue, 5 Mar 2013 04:26:32 +0000 (UTC) Received: (qmail 32704 invoked by uid 500); 5 Mar 2013 04:26:31 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 32393 invoked by uid 500); 5 Mar 2013 04:26:31 -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 32347 invoked by uid 99); 5 Mar 2013 04:26:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 04:26:29 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=FRT_ADOBE2,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Michael.Wolf@cynergy.com designates 69.194.133.205 as permitted sender) Received: from [69.194.133.205] (HELO ns1.cynergy.com) (69.194.133.205) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 04:26:25 +0000 Received: from localhost (ns1.cynergysystems.com [127.0.0.1]) by ns1.cynergy.com (Postfix) with ESMTP id F3B415D0123 for ; Mon, 4 Mar 2013 20:26:04 -0800 (PST) X-Virus-Scanned: amavisd-new at cynergysystems.com Received: from ns1.cynergy.com ([127.0.0.1]) by localhost (ns1.cynergysystems.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 788xe2J8-LOk for ; Mon, 4 Mar 2013 20:26:03 -0800 (PST) Received: from EXCHSRV1.CynergySystems.com (unknown [10.0.0.8]) by ns1.cynergy.com (Postfix) with ESMTP id E180A5D011F for ; Mon, 4 Mar 2013 20:26:03 -0800 (PST) Received: from exchsrv1.CynergySystems.com ([10.0.0.8]) by exchsrv1 ([10.0.0.8]) with mapi; Mon, 4 Mar 2013 20:26:02 -0800 From: Michael Wolf To: "dev@cordova.apache.org" Date: Mon, 4 Mar 2013 20:25:51 -0800 Subject: Re: cordova command cli and merges concept pull request Thread-Topic: cordova command cli and merges concept pull request Thread-Index: Ac4ZWYtniua4oNpOT5OhwWHSOHHq4w== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.1.130117 acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Awesome glad to help! mw On 3/4/13 7:22 PM, "Filip Maj" wrote: >Hey everyone > >Just merged this functionality in and pushed up to the apache repo. It's >available on master now, and will be released in our Cordova 2.6.0rc1 >release. > >In the meantime it exists as 2.5.2 on npm (just in the process of >publishing). > >Michael I've added you to the contributors list. Thanks again for your >work! > >On 2/18/13 2:39 PM, "Michael Wolf" wrote: > >>No, will get the icla sorted this week. Happy to help. >> >>Sent from my Windows Phone >>________________________________ >>From: Filip Maj >>Sent: ?2/?18/?2013 2:07 PM >>To: dev@cordova.apache.org >>Subject: Re: cordova command cli and merges concept pull request >> >>Hey Michael, >> >>I've rebased/merged your changes with the latest master and did a bit of >>refactoring and tweaks to get the tests passing again. >> >>I've pushed this up to the "merges" branch on apache: >>https://git-wip-us.apache.org/repos/asf?p=3Dcordova-cli.git;a=3Dshortlog;= h=3Dre >>f >>s >>/heads/merges >> >>Once we have your ICLA sorted, I will merge it into master. >> >>Thanks for taking the time to do the work! Really appreciate it! >> >>Best, >>Fil >> >>On 2/17/13 3:53 PM, "Michael Wolf" wrote: >> >>>Hey All: >>> >>>Posted changes to include tests (making sure the method gets called in >>>the >>>build and then per parser making sure the copied files make their way >>>into >>>the build) and made a subtle change in where in the process merges were >>>being copied, per Filip's feedback. >>> >>>Thanks, let me know if you have any feedback. >>> >>>mw >>> >>>On 2/13/13 2:20 AM, "Filip Maj" wrote: >>> >>>>I'm working with Michael off this discussion thread to get the code up >>>>to >>>>par. >>>> >>>>Michael, feel free to update your pull request and ping this thread >>>>whenever you get a chance to update it. Then we can all take a look. >>>> >>>>On 2/12/13 10:15 PM, "Anis KADRI" wrote: >>>> >>>>>I believe this is a valid request. I like the idea of having >>>>>platform-specific code only deployed to matching devices. >>>>>I looked at the pull request and it looks good but as Fil mentioned, >>>>>it >>>>>needs some tests. >>>>> >>>>> >>>>>On Tue, Feb 12, 2013 at 11:07 AM, Brian LeRoux wrote: >>>>> >>>>>> yes there is some issues w/ emulation in this approach but I think >>>>>>its >>>>>> a better architectural pattern for a universal project. we can make >>>>>> ripple w/ this style rather the other way around. >>>>>> >>>>>> On Tue, Feb 12, 2013 at 6:48 PM, Michael Wolf >>>>>> >>>>>> wrote: >>>>>> > Have looked at suggesting folks mock in-browser using ripple... >>>>>>however >>>>>> > there are a few issues with that, firstly being simply doesn't >>>>>>work >>>>>>for >>>>>> > non webkit platforms (ie windows phone... yah the cli doesn't >>>>>>currently >>>>>> > support windows phone but no reason why it can't) ... Also while >>>>>>you >>>>>>can >>>>>> > mock to work in ripple, you still have to write code in your base >>>>>>www >>>>>> that >>>>>> > only runs in browser / ripple and mock for it (unless I'm doing it >>>>>>wrong >>>>>> > :) ), which then introduces this conditional code which then ends >>>>>>up >>>>>>on a >>>>>> > device (which I recommend people to shy away from when they >>>>>>can)... >>>>>> where as >>>>>> > using the merges folder for this purpose makes the existence of >>>>>>those >>>>>> > mocks a purely www artifact that never ends up on a device or >>>>>>native >>>>>> > emulator... >>>>>> > >>>>>> > But I'll also admit I haven't looked deeper into ripple to see if >>>>>>there >>>>>> is >>>>>> > an alternative there, because the merges concept just worked for >>>>>>us. >>>>>> > >>>>>> > mw >>>>>> > >>>>>> > On 2/12/13 12:05 PM, "Filip Maj" wrote: >>>>>> > >>>>>> >>Cool, thanks Michael. I will take a look when I get a chance. >>>>>>Curious >>>>>> what >>>>>> >>the rest of the list thinks. >>>>>> >> >>>>>> >>As for mocking in-browser, I recommend trying out Ripple - it has >>>>>>great >>>>>> >>support for mocking out arbitrary cordova plugins. >>>>>> >> >>>>>> >>On 2/12/13 6:10 AM, "Gorkem Ercan" wrote: >>>>>> >> >>>>>> >>>I have been cooking up a similar functionality for Cordova >>>>>>development >>>>>> >>>plugins for Eclipse IDE that I am building. I think the only real >>>>>> >>>difference with what I have is I have named the merges folder as >>>>>> >>>www_platform. >>>>>> >>> >>>>>> >>>As my goal is to keep 100% compatible with cordova-cli I was >>>>>>planning to >>>>>> >>>provide a PL for the same so I would be interested with this work >>>>>>and >>>>>> >>>offer >>>>>> >>>help if needed. >>>>>> >>>-- >>>>>> >>>Gorkem >>>>>> >>> >>>>>> >>>On Tue, Feb 12, 2013 at 6:28 AM, Michael Wolf >>>>>> >>>wrote: >>>>>> >>> >>>>>> >>>> Hey all: >>>>>> >>>> >>>>>> >>>> I submitted a pull request for an enhancement of the addition >>>>>>of >>>>>>a >>>>>> >>>>merges >>>>>> >>>> folder/concept into the cli build process. >>>>>> >>>> >>>>>> >>>> https://github.com/apache/cordova-cli/pull/3 >>>>>> >>>> >>>>>> >>>> The concept of merges is pretty simple, to support a common >>>>>>core >>>>>>web >>>>>> >>>>base >>>>>> >>>> across platforms, but allow for deploying platform specific www >>>>>> content >>>>>> >>>>to >>>>>> >>>> specific platforms. The addition to the CLI tool adds a new >>>>>>folder >>>>>> >>>> "merges" to the root level. Upon running "cordova platforms >>>>>> add|remove >>>>>> >>>> platform" a new folder is created under the "merges" folder >>>>>>(ie: >>>>>> >>>>merges/ios >>>>>> >>>> , merges/android etc). Upon running "cordova buid" any content >>>>>>added >>>>>> >>>>to >>>>>> >>>> this folder will be deployed to the associated www folder in >>>>>>the >>>>>> >>>>platforms. >>>>>> >>>> This carries for either new content being added, or more >>>>>>importantly >>>>>> >>>> overrides existing content from the www folder. For a very >>>>>>simple >>>>>> >>>>example >>>>>> >>>> imagine you have a css file named css/chrome.css in the www >>>>>>folder, >>>>>> >>>>where >>>>>> >>>> you could have .backButton { display:block;} , but then under >>>>>> >>>> merges/android/css/chrome.css you could have >>>>>> >>>>.backButton{display:none;}, >>>>>> >>>> this is a very simplistic use but it illustrates the concept. >>>>>>This >>>>>> >>>> additional workflow to the build system in the cli enables some >>>>>>great >>>>>> >>>> processes for building a nice clean cordova app for example. >>>>>> >>>> >>>>>> >>>> >>>>>> >>>> * Allows for keeping code clean and limits the need for >>>>>>platform >>>>>> >>>> specific js logic per platform >>>>>> >>>> * Enables a process of mocking in custom plugins for in >>>>>>browser >>>>>>dev >>>>>> >>>> (mocks under www real implementations under merges) , and not >>>>>>risking >>>>>> >>>>this >>>>>> >>>> code filtering into production/device code >>>>>> >>>> * Allows for creating platform specific assets such as css / >>>>>>font / >>>>>> >>>> images/ videos etc that only gets merged into the specific >>>>>>desired >>>>>> >>>>platform >>>>>> >>>> * Allows for accepting that each platform is unique and >>>>>>sometimes >>>>>> >>>>need >>>>>> >>>> specific logic and or shims, and always deserves the platform >>>>>> specific >>>>>> >>>> love, and the build process should support doing this cleanly >>>>>> >>>> >>>>>> >>>> Anywho =A9.. Would love to see this integrated in. >>>>>> >>>> >>>>>> >>>> Thanks >>>>>> >>>> >>>>>> >>>> mw >>>>>> >>>> >>>>>> >>> >>>>>> >>> >>>>>> >>> >>>>>> >>>-- >>>>>> >>>-- >>>>>> >>>Gorkem >>>>>> >>>http://www.gorkem-ercan.com >>>>>> >> >>>>>> > >>>>>> >>>> >>> >> >