updated watchfile

This commit is contained in:
brianc 2010-10-03 00:53:25 -05:00
parent 730321dbd4
commit c8e387752a

View File

@ -1,17 +1,13 @@
#watch file #watch file
def run_test_file(f)
def run_parser_tests puts "running #{f}"
system("node test/parser-tests.js") system "node #{f}"
puts "" puts "done"
puts("#{Time.now} waiting...")
puts ""
end end
watch('lib/(.*)\.js') { |md| watch('lib/(.*)\.js') { |md|
puts "lib changed" puts Dir["test/*.js"].each { |f| run_test_file(f) }
run_parser_tests
} }
watch('test/(.*)\.js') { |md| watch('test/(.*)\.js') { |md|
system("node #{md}"); run_test_file(md)
} }