Github user kxepal commented on the pull request:
https://github.com/apache/couchdb-couch-mrview/pull/28#issuecomment-141677538
@nickva cool! Do you want accept my patch? I think it's a bit more
Erlang`ish (: However, it need to be improved in few places as I didn't spend
much time for make it well.
Also, issue with map-less views still need to be addressed. If you need
some real case: geocouch. While it uses `spatial` object for index functions,
it CommonJS modules picks from `views.lib`, so you may have a design document
like this one (picked from geocouch tests):
```
{
"_id": "_design/spatial",
"language": "javascript",
"views": {
"lib": {
"geo": "exports.type = 'Point';"
}
},
"spatial": {
"basicIndex": "function(doc) {var lib = require('views/lib/geo');
emit({type: lib.type, coordinates: [doc.loc[0], doc.loc[1]]}, doc.string);}"
}
}
```
And while there is everything ok with it, eventually we not allow such
ddocs without strong reason why.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---