From user-return-22154-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Sep 19 15:12:29 2012 Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B38E3D051 for ; Wed, 19 Sep 2012 15:12:29 +0000 (UTC) Received: (qmail 41860 invoked by uid 500); 19 Sep 2012 15:12:28 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 41817 invoked by uid 500); 19 Sep 2012 15:12:28 -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 41809 invoked by uid 99); 19 Sep 2012 15:12:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2012 15:12:28 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of carl.bourne@me.com designates 17.158.236.236 as permitted sender) Received: from [17.158.236.236] (HELO nk11p04mm-asmtp001.mac.com) (17.158.236.236) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Sep 2012 15:12:22 +0000 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from [192.168.7.102] (fas011-90630-net-adsl-05.altohiway.com [213.83.104.29]) by nk11p04mm-asmtp001.mac.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Jan 3 2012)) with ESMTPSA id <0MAL001XSRJYBB70@nk11p04mm-asmtp001.mac.com> for user@couchdb.apache.org; Wed, 19 Sep 2012 15:12:00 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855,1.0.431,0.0.0000 definitions=2012-09-19_04:2012-09-19,2012-09-19,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=6 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1209190151 Subject: Re: Third Party JavaScript libraries From: Carl Bourne In-reply-to: Date: Wed, 19 Sep 2012 16:11:54 +0100 Message-id: References: <46A08752-9AB2-4834-AB05-40B4B62D3C77@me.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1486) Thanks Ryan, Does this mean I can get access to moments from within may map logic or does it strictly relate to views only? On 19 Sep 2012, at 15:39, Ryan Ramage wrote: > Carl, > > Yes, you sure can. Here is an example view using moment > > https://github.com/datacitizen/water-quality/blob/master/lib/views.js#L44 > > The view is a little complicated, but at least you can see a spot > where moment is being used. Because it is being used in a view, you > have to have it at a certain spot in your design doc. Your design doc > should have something like this > > ddoc.views.lib.moment = "// moment.js// version : 1.6.2// author : Tim > Wood// l...." > > Here is a the design doc, when it is on couch: > > http://nwt.iriscouch.com/_utils/document.html?water-quality/_design/water-quality > > Of course, using a couchapp tool like kanso makes this stuff easier, > but at least you should get the general idea how it is working. > > Ryan > > > > > On Wed, Sep 19, 2012 at 8:13 AM, Carl Bourne wrote: >> Hi, >> >> I would like to use the moments.js http://momentjs.com/ library in my CouchDB map views. >> >> Would somebody mind explaining if indeed this is possible and the best approach for adding it. >> >> Best Regards, >> >> Carl