node-postgres/watch.rb
2010-10-03 00:53:25 -05:00

14 lines
232 B
Ruby

#watch file
def run_test_file(f)
puts "running #{f}"
system "node #{f}"
puts "done"
end
watch('lib/(.*)\.js') { |md|
puts Dir["test/*.js"].each { |f| run_test_file(f) }
}
watch('test/(.*)\.js') { |md|
run_test_file(md)
}