Nils Breunese wrote:

Adam Wolff wrote:

It'd be great to make it so that _design docs can define helper
functions too, so that two views can share a helper.

You can already define functions in a separate file and use macros to 'import' them when defining view functions.

For clarity: macros are a couchapp feature. Examples of the use of !json and !code macros can be found in Sofa [0], for instance in lists/index.js. They look like comments (starting with '//' and all), but those lines are processed by couchapp when pushing an app to CouchDB.

Nils Breunese.

[0] http://github.com/jchris/sofa/tree/master

Reply via email to