From dev-return-8687-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Thu Feb 18 21:37:49 2010 Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 44147 invoked from network); 18 Feb 2010 21:37:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Feb 2010 21:37:49 -0000 Received: (qmail 10596 invoked by uid 500); 18 Feb 2010 21:37:49 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 10514 invoked by uid 500); 18 Feb 2010 21:37:48 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 10504 invoked by uid 99); 18 Feb 2010 21:37:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Feb 2010 21:37:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Feb 2010 21:37:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EC63429A0016 for ; Thu, 18 Feb 2010 13:37:27 -0800 (PST) Message-ID: <283604697.369571266529047966.JavaMail.jira@brutus.apache.org> Date: Thu, 18 Feb 2010 21:37:27 +0000 (UTC) From: "mikeal (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-658) Add CommonJS style modules to the view server In-Reply-To: <1925896481.368831266527367954.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835415#action_12835415 ] mikeal commented on COUCHDB-658: -------------------------------- I thought about the semantics for doing "vendor/crypto/sha" and decided against traversing the object so that it was more like the way the attachments work just naming the keys with "/" in them. That will already work, so you can do: { ... "modules" : {"vendor/crypto/sha":"code"}, } The thing about importing code from show, list and and other view functions is that they aren't CommonJS compatible, they don't assign their function to exports which means it won't be accessible through a require if we want to comply with the spec. > Add CommonJS style modules to the view server > --------------------------------------------- > > Key: COUCHDB-658 > URL: https://issues.apache.org/jira/browse/COUCHDB-658 > Project: CouchDB > Issue Type: Improvement > Components: JavaScript View Server > Environment: CouchDB > Reporter: mikeal > Attachments: require.patch > > > I have a patch that adds CommonJS module support to all ddoc aware view server functions (everything except map/reduce/rereduce). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.