Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 37648 invoked from network); 7 May 2010 13:08:10 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 May 2010 13:08:10 -0000 Received: (qmail 14846 invoked by uid 500); 7 May 2010 13:08:08 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 14777 invoked by uid 500); 7 May 2010 13:08:08 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 14769 invoked by uid 99); 7 May 2010 13:08:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 13:08:08 +0000 X-ASF-Spam-Status: No, hits=-0.9 required=10.0 tests=AWL,FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebastiancohnen@googlemail.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 May 2010 13:08:02 +0000 Received: by fxm19 with SMTP id 19so914561fxm.11 for ; Fri, 07 May 2010 06:07:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=KBGZvoq57Ovn6oHdlNZ1kYzNvzLdK/pburtCe7eJ0R0=; b=sOLwqRPjQT6q1t9lE69T4l3ijTP7dv/lOXD/dgt/mrDd+fvGUmytMRlQMCeAOn442Z j+uab8/keIi48OuDMm+bJRl2FM8X25J30DKlt9CMdvr5wbU7SII2T6kyJlgiA6yTjUZM x/FCiW1PEZeiHKEV3Jv2bqhkARQBsHy6j4Pr8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=Ullf3iS0VFoo0EES6wSST7UKGkvf+U2WqtdYB6UiruC9uQVgUUnOyG1Pm94MAuY9IG zbXzaSYHBSgos2SlHav1kjAIEz0chFtIuQ/4LhgoTH0ACVCCvxeSUM81wHE2PKNp27OZ HrUMJGIovEI5rGDwBixwPN2es0IkFXyRc3lP0= Received: by 10.102.12.21 with SMTP id 21mr13211811mul.3.1273237660555; Fri, 07 May 2010 06:07:40 -0700 (PDT) Received: from [192.168.178.21] (koln-5d81a9d5.pool.mediaWays.net [93.129.169.213]) by mx.google.com with ESMTPS id y37sm8523925mug.52.2010.05.07.06.07.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 May 2010 06:07:39 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1078) Subject: Re: including external javascript libs From: Sebastian Cohnen In-Reply-To: Date: Fri, 7 May 2010 15:07:37 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1078) 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 = http://wiki.apache.org/couchdb/CommonJS_Modules ) 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. >=20 > Thanks In Advance >=20 > --=20 > Erich Oliphant >=20 > "There are, in fact, two things, science and opinion, the former = begets > knowledge, the latter ignorance" > -- Hippocrates of Cos