cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian LeRoux...@brian.io>
Subject Re: Cordova workflows based on build systems / task runners
Date Wed, 13 Aug 2014 23:00:31 GMT
this is great / really like it / would be super clean to layer on from here
(frameworks, browserify, whatevs)


On Wed, Aug 13, 2014 at 3:18 PM, Mark Koudritsky <kamrik@google.com> 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 ;)
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message