Hi,
I have a question regarding CommonJS within views..
Should this work, or is it a bug that it doesn't? Using CouchDB 1.2.0
{
_id: "_design/commonjs-test",
views: {
lib: {
include1: "var include2 = require('views/lib/include2'); exports.foo1 =
include2.foo2;",
include2: "exports.foo2 = 42"
},
my_view: {
map: "function(doc) { emit( require('views/lib/include1').foo1, null); }"
}
}
}
If it should work what might I be doing wrong?
Thanks,
Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International