grunt-couch-data
Synchronizes JSON fixtures with CouchDB
Getting Started
This plugin requires Grunt ~0.4.5
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-couch-data --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "couch_data" task
Overview
In your project's Gruntfile, add a section named couch_data
to the data object passed into grunt.initConfig()
.
grunt;
Options
options.dbHost
Type: String
Default value: None
Specifies the Couch DB server. It must end with a slash.
options.verbose
Type: Boolean
Default value: false
Enables or disables verbose output.
Usage Examples
You must specify the .json fixture files, either by providing a files
array or by providing a files src
array within
a particular target.
No target
For a simple setup, just list out your fixture files in the files
property.
grunt;
Target-specific setup
You can have different fixtures loaded based on your target.
grunt;
Notes
This currently only works without authentication, so your sever must be in Admin Party mode. This will be changed in a later release to allow for authentication.
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Release History
(Nothing yet)