Skip to content

Commit

Permalink
Add docs.watchr script
Browse files Browse the repository at this point in the history
  • Loading branch information
mynyml committed Feb 7, 2010
1 parent 83c7087 commit 29f0643
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
doc/
.yardoc/
25 changes: 25 additions & 0 deletions docs.watchr
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Run me with:
# $ watchr docs.watchr

require 'yard'
# --------------------------------------------------
# Rules
# --------------------------------------------------
watch( 'lib/.*\.rb' ) { yard }
watch( 'README.md' ) { yard }

# --------------------------------------------------
# Signal Handling
# --------------------------------------------------
Signal.trap('QUIT') { yard } # Ctrl-\
Signal.trap('INT' ) { abort("\n") } # Ctrl-C

# --------------------------------------------------
# Helpers
# --------------------------------------------------
def yard
print "Updating yardocs... "; STDOUT.flush
YARD::CLI::Yardoc.run *%w( --no-highlight -o doc/yard --readme README.md - LICENSE )
print "done\n"
end

0 comments on commit 29f0643

Please sign in to comment.