From 48f92f4452464e4bbd8d0a73ce51f2955973b3a0 Mon Sep 17 00:00:00 2001 From: Jean Mertz Date: Sun, 13 Nov 2011 14:28:15 +0100 Subject: [PATCH] Update documentation to tidy things up and explain run_all option --- README.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b34c01c..2aed4dc 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,21 @@ It's a [Guard](http://github.com/guard/guard) for the [Rocco](http://github.com/rtomayko/rocco) documentation system! - guard 'rocco' do - watch(%r{^app/.*\.(rb|coffee)$}) - watch(%r{^lib/.*\.rb$}) - end - +``` ruby +# default values +guard 'rocco', :run_all => [:start, :change], :dir => 'doc', :stylesheet => 'http://jashkenas.github.com/docco/resources/docco.css' do + watch(%r{^app/.*\.(rb|coffee)$}) + watch(%r{^lib/.*\.rb$}) +end +``` Options: -* `:dir` specifies the output dir (default `doc`) -* `:stylesheet` specifies a custom stylesheet to use (default is - http://jashkenas.github.com/docco/resources/docco.css) +* `:run_on` specifies when to update the docs + * `:start` - run on all documentation when the guard starts + * `:change` - run when watched files change + * `:reload` - run when the guard is reloaded + * `:all` - run when running all the guards +* `:dir` specifies the output dir +* `:stylesheet` specifies a custom stylesheet to use `gem install guard-rocco` or Bundle it up with `gem 'guard-rocco'`. Then `guard init rocco`. Yeah!