Added demo task, and updated README to point to demo.

This commit is contained in:
Ken Elf Mathieu Sternberg 2012-08-09 18:51:11 -07:00
parent 650f99fc16
commit b514a1e27e
2 changed files with 11 additions and 2 deletions

View File

@ -20,8 +20,8 @@ grunt.loadNpmTasks('grunt-couchapp');
## Documentation ## Documentation
You'll want to add some configuration for the plug-in. This plugin You'll want to add some configuration for the plug-in. This plugin
provides three tasks, *mkcouchdb* to create new databases, *rmcouchdb* provides three tasks, `mkcouchdb` to create new databases, `rmcouchdb`
to delete all data and drop an existing database, and *couchapp*, to delete all data and drop an existing database, and `couchapp`,
which installs a specified couchapp into the database. which installs a specified couchapp into the database.
mkcouchdb: { mkcouchdb: {
@ -71,6 +71,14 @@ possible to write in your configuration file:
Note, however, that if you call 'rmcouchdb' without a sub-argument, in Note, however, that if you call 'rmcouchdb' without a sub-argument, in
keeping with grunt's standards, it will drop *all* of your databases! keeping with grunt's standards, it will drop *all* of your databases!
## Demo
It is possible to run the entire toolchain (drop, initialize, and
install) with the grunt.js file by calling `grunt demo`. As long as
you have a local couchdb running in admin-party mode, and browse to
`http://localhost:5984/grunt-couchapp-demo/_design/app/index.html`
You should get back a happy message.
## Contributing ## Contributing
In lieu of a formal styleguide, take care to maintain the existing In lieu of a formal styleguide, take care to maintain the existing

View File

@ -58,4 +58,5 @@ module.exports = function(grunt) {
// Default task. // Default task.
grunt.registerTask('default', 'lint test'); grunt.registerTask('default', 'lint test');
grunt.registerTask('demo', 'rmcouchdb:demo mkcouchdb:demo couchapp:demo');
}; };