On Wed, Mar 11, 2009 at 6:59 AM, Zachary Zolton
<[email protected]> wrote:
> I was a bit mislead by the title; this sounds like caching the
> parsed/ready-to-go JavaScript view functions.
>
> However, I am interested in hearing how we can introduce helper code,
> and reusable libraries, into our JavaScript views.
>

Check out the CouchApp script, which has macros for including helper
code automatically in view functions when saving the design documents.
This is really the best way to do it, as the functions as stored in
the design doc can not depend on definitions elsewhere in the code. If
there are a set of helpers you'd like to see as sort of a standard
library for MapReduce, they'd make great candidates for inclusion in
the CouchApp vendor package.

Scan the README for mention of the !code macro:
http://github.com/jchris/couchapp/blob/master/README.md

-- 
Chris Anderson
http://jchris.mfdz.com

Reply via email to