jo/grunt-couch — pull request #6 by tsclausing (2013-07-30 16:25:57+00:00)
Title: Allow dd parts to be written as CommonJS modules

The benefit of this PR is to allow individual design doc parts to be easily unit tested with tools like mocha by writing them as require-able CommonJS modules.

Changes include:

* `options.exports` added to `couch-compile` task
* tests
* readme docs
* patch version increment

This is a non-destructive, fully backwards compatible change.

When `options.exports` is set to a glob pattern, design doc parts which match the pattern(s) are interpreted as modules and have the contents of `module.exports` is written to the design document instead of the raw text of the file.