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

Chris Anderson commented on COUCHDB-658:
----------------------------------------

@benoit

I don't think we should remove the couchapp macros as they are compatible with 
all kinds of messy old code, not just commonjs modules.

As far as the JSON macro goes, it is already not strictly necessary outside of 
map and reduce, as the ddoc is present as 'this' so you can do:

function(req, doc) {
  var template = this.my_templates.some_stuff.the_template;
...
}

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

Reply via email to