: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 <[email protected]> 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 ;)
>

Reply via email to