incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Gabriel <a...@barbalex.ch>
Subject Re: [ann] mustache.couch.js: helper for streaming Mustache templates from list funs
Date Tue, 01 Nov 2011 22:51:47 GMT
awesome
much appreciated
Alex

2011/11/1, Geoff Buesing <geoff@geoffbuesing.com>:
> Hi, just wanted to let everyone know that I released mustache.couch.js, a
> helper for streaming Mustache templates from list funs.
>
> I got tired of gluing together strings in my list funs, so I built this
> helper, which allows me to keep separate template files with an inline row
> partial, and wrap them in a normalized layout.html.
>
> Resulting list funs are much cleaner.  Example:
>
> function(head, req) {
>   var template = require('vendor/mustache.couch').compile(this, 'notes');
>
>   template.stream({title: 'Notes'}, function(row) {
>     return row.doc;
>   });
> }
>
> Code with example CouchApp and a detailed README are here:
>
> https://github.com/gbuesing/mustache.couch.js
>
> Hope this is useful to others. Feedback appreciated.
>


-- 




*****************************************************************



Alexander Gabriel
Wiesenstrasse 22
8800 Thalwil
079/ 372 51 64
alex@barbalex.ch
ww.barbalex.ch

Mime
View raw message