couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mikeal (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COUCHDB-658) Add CommonJS style modules to the view server
Date Thu, 18 Feb 2010 21:37:27 GMT

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


Mime
View raw message