You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "mikeal (JIRA)" <ji...@apache.org> on 2010/02/18 22:17:28 UTC

[jira] Commented: (COUCHDB-658) Add CommonJS style modules to the view server

    [ https://issues.apache.org/jira/browse/COUCHDB-658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835405#action_12835405 ] 

mikeal commented on COUCHDB-658:
--------------------------------

Example:

{
   "_id": "_design/test",
   "_rev": "2-0e83a5d55da4b6461524f0996f7d2b17",
   "modules": {
       "name": "exports.testing = 'asdf'"
   },
   "shows": {
       "test": "function(doc,req){return require('name').testing;}"
   }
}

GET _design/test/_show/test/{docid} 

will return a page with 'asdf'

> 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.