mirror of
https://github.com/brianc/node-postgres.git
synced 2026-02-01 16:47:23 +00:00
updated watchfile
This commit is contained in:
parent
730321dbd4
commit
c8e387752a
16
watch.rb
16
watch.rb
@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user