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 2F9E2113C1 for ; Mon, 18 Aug 2014 21:38:49 +0000 (UTC) Received: (qmail 35893 invoked by uid 500); 18 Aug 2014 21:38:49 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 35853 invoked by uid 500); 18 Aug 2014 21:38:49 -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 35841 invoked by uid 99); 18 Aug 2014 21:38:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2014 21:38:48 +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 (nike.apache.org: domain of kamrik@google.com designates 209.85.219.45 as permitted sender) Received: from [209.85.219.45] (HELO mail-oa0-f45.google.com) (209.85.219.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Aug 2014 21:38:22 +0000 Received: by mail-oa0-f45.google.com with SMTP id i7so4555685oag.18 for ; Mon, 18 Aug 2014 14:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=iR3QaAjMk4yoCy0AhTJmNKdk2fkMqfdPtOetM/9oEHg=; b=U0qfqYP1naD1HzZWEAypVhVxRv9D4Qr7+WHnCtmpnsj45Yc7CB7cRkNcwELBOnqXKz 0cbS235KCKj/Qwdboe3QzUGHHQzFfsSEUEDApsof6najGBycpGAPCAbCJ3Pz4ot8cb7W fy32Dx6x41VV5rK85bfi1NwMeWS1llgSGHR121m9cR40ySDNKJQk5tJlIX3G/EMfUyXH y29S35J5zKsaqwKgj8aMCmrXwEOAOD3yQ2lfZNaioUT3PYQsuj6ii4ifYMss3RBdqlZk zodH3QXXNMKnbc4fpOFpTHv0Kggp05kfZ837aNShU3JMj7QJrM5O74mBI06br4khK1mk Kh9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=iR3QaAjMk4yoCy0AhTJmNKdk2fkMqfdPtOetM/9oEHg=; b=ZXzoC96goEnk24NgvrouJrqnlCoLBUZcy0D3Ny9wWpTHOEQGQ3pKhXfJNMMWJvr19Z 1GrrkiIGxvLYfnINwAC3X8XxcO54Hk39iz/IBJFBEhbd+gKeeAkJicpqOqZ7C0+JHHoC h1djL0X93KICD/Wm+xz28w5C3TIirdSULDlcS6CM9jioIIMkXVJCyfTWh0AdDSd5T/5q EMuS3i5eySJhsOEHBzhiPerYVVYAR9nECG0GPtYexmkFnDkrwjvgGuaOoWuJP42wuXu0 2kB6ussJv290U8P7YB8JpM7z6cxXWAp3GWQig6As7ET/NO1xvWAeoNdGLZFdkCgrEXjr FFbQ== X-Gm-Message-State: ALoCoQnwy5JmGYEwmdqGbRS4sw+aHzOYyqlRUqVoYi2Ausems0LMz3sO1PYt+/fBxlg7G/H9VHj+ MIME-Version: 1.0 X-Received: by 10.60.65.8 with SMTP id t8mr35052870oes.47.1408397901177; Mon, 18 Aug 2014 14:38:21 -0700 (PDT) Received: by 10.202.193.132 with HTTP; Mon, 18 Aug 2014 14:38:21 -0700 (PDT) In-Reply-To: References: Date: Mon, 18 Aug 2014 17:38:21 -0400 Message-ID: Subject: Re: Cordova workflows based on build systems / task runners From: Mark Koudritsky To: dev@cordova.apache.org Content-Type: multipart/alternative; boundary=001a11c1d5fe9a44c50500ee30b0 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c1d5fe9a44c50500ee30b0 Content-Type: text/plain; charset=UTF-8 Ok, submitted a PGDay proposal for this :) Carlos, I had no particular point when starting this thread, just wanted to share this experiment. Michael, the hardcoded paths are mainly because I'm not using Cordova's "create" and instead reproduce the cordova project dir structure by symlinking, or alternatively by filtering via Gulp style streams into the right dirs for cordova. This is first time I use gulp so I'm not sure if this should be converted into a gulp plugin. Using it as boilerplate seems pretty straightforward. On Thu, Aug 14, 2014 at 11:08 AM, Carlos Santana wrote: > My grunt-cordovacli [1] plugin works in a similar way, just using > cordova-cli PAIs which I a year ago there was no cordova-lib APIs or gulpjs > > I can create a slushjs [2] using cordoval-lib just for fun :-), but I'm > missing the point of this thread? Is the point to evaluate what could be a > good set of plublic APIs for cordova-lib? > > [1] : https://www.npmjs.org/package/grunt-cordovacli > [2] : https://www.npmjs.org/package/slush > > > > > On Thu, Aug 14, 2014 at 10:07 AM, Andrew Grieve > wrote: > > > Certainly shows some rough spots of the CLI interface e.g.: > > - Need to add plugins before platforms > > - Need to chdir() before calling functions > > > > And yes - love that this makes cordova fit in more nicely with other > parts > > of an app's build system. > > > > One thing I wondered when reading it is if Cordova should have an api > for a > > bare-bones "prepare" step. E.g. - don't copy from root www -> platform > ww, > > but just copy in cordova.js & plugin files, assume that the user will > take > > care of putting everything else into the platform www/ > > > > > > > > > > On Wed, Aug 13, 2014 at 9:31 PM, Brian LeRoux wrote: > > > > > "Topic for a PGDay talk!" <--yes pls submit > > > > > > > > > On Wed, Aug 13, 2014 at 5:31 PM, Michal Mocny > > wrote: > > > > > > > :D So cool! > > > > > > > > If I understand correct, this is a combination of: > > > > (a) using the cordova-lib node interface directly > > > > (b) iterating node_modules and inferring the set of platforms from > that > > > > (c) plugins are listed explicitly since we don't use real npm > > > > (d) treating www/ as the output of an initial gulp stream > > > > > > > > There are some hardcoded paths, but I guess thats just your sample > > > > gulpfile. Probably we would either publish a gulp plugin that takes > in > > > > args, or just leave this repo as boilerplate and let users tweak > > > > accordingly? > > > > > > > > I've not played with Carlos' grunt based workflow, but wonder how > > similar > > > > that approach is. > > > > > > > > I think this could be a sweet workflow and find it encouraging to see > > how > > > > it could be thrown together. Topic for a PGDay talk!? ;) > > > > > > > > -Michal > > > > > > > > > > > > On Wed, Aug 13, 2014 at 6:18 PM, Mark Koudritsky > > > > wrote: > > > > > > > > > Hi all, > > > > > > > > > > Inspired by several recent conversations on this mailing list I've > > been > > > > > thinking about a Cordova workflow based on some build system. As an > > > > > experiment I've put together this app using Gulp and cordova-lib: > > > > > > > > > > https://github.com/kamrik/CordovaGulpTemplate > > > > > > > > > > To try it out > > > > > git clone https://github.com/kamrik/CordovaGulpTemplate.git > > > > > cd CordovaGulpTemplate > > > > > npm install > > > > > npm install gulp -g # if you don't yet have gulp installed. > > > > > gulp recreate > > > > > gulp build|emulate|run > > > > > > > > > > The important files are: > > > > > * package.json > > > > > * gulpfile.js > > > > > * src/config.xml (the cordova config.xml) > > > > > * src/www/ (copied as is from the default cordova www template) > > > > > The whole cordova project dir is treated as a build artifact. It > > lives > > > > > under ./build (ignored by git and nuked by "gulp clean"). > > > > > > > > > > > > > > > Some benefits of this workflow: > > > > > - Cordova can blend in as just another tool in the app workflow > > > > alongside > > > > > stuff like Sass, template and CoffeeScript/Dart preprocessing etc. > > > > > - Can use any folder structure under ./src, the cordova project > > > > structure > > > > > is created under ./build by linking or copying from ./src (or by > > > > filtering > > > > > via transpilers). > > > > > - Platforms are listed as app dependencies in package.json. As a > > > result, > > > > > npm downloads them and platform version preferences are set just > like > > > > with > > > > > any npm deps. (plugins are not treated this way, see comments in > > > > gulpfile). > > > > > - No need to programmatically edit config.xml to store platform > > list. > > > > > - As a bonus, people disliking XML can make a simple Gulp plugin > > that > > > > > would generate Cordova's config.xml from a more human friendly > > > > > json/yaml/ini/whatever file ;) > > > > > > > > > > > > > > > > > > -- > Carlos Santana > > --001a11c1d5fe9a44c50500ee30b0--