incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Cohnen <>
Subject Re: including external javascript libs
Date Fri, 07 May 2010 13:07:37 GMT
the !code macro simply replaces itself with the content of the target. if you don't want to
use couchapp, you have to insert your code yourself. "loading" from an external resource is
not allowed since views wouldn't be side effect free (couch would not notice if the external
code has been changed).

For loading code in show, list, update and validation functions you can use CommonJS-style
modules (see )

On 07.05.2010, at 14:43, erich oliphant wrote:

> Hi,
> I am trying to figure out the best way to include js libs in my couch
> show,view,etc functions.  I just realized the the examples in the couch book
> with the !code and !json macros are specific to CouchApp.  For instance I
> ned to parse some ISO 8601 dates, and have a little date.js script that I'd
> like to include in my functions.
> Thanks In Advance
> -- 
> Erich Oliphant
> "There are, in fact, two things, science and opinion, the former begets
> knowledge, the latter ignorance"
> -- Hippocrates of Cos

View raw message