forked from mynyml/watchr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocs.watchr
26 lines (23 loc) · 799 Bytes
/
docs.watchr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Run me with:
# $ watchr docs.watchr
require 'yard'
# --------------------------------------------------
# Rules
# --------------------------------------------------
watch( 'lib/.*\.rb' ) { yard }
watch( 'README.md' ) { yard }
watch( 'TODO.md' ) { yard }
watch( 'LICENSE' ) { 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( -o doc/yard --readme README.md --markup markdown - LICENSE TODO.md )
print "done\n"
end