mirror of
https://github.com/zoo-labs/zoo.git
synced 2026-11-10 22:32:34 +00:00
25 lines
563 B
JavaScript
25 lines
563 B
JavaScript
const watch = require('node-watch')
|
|
const { exec } = require('child_process')
|
|
|
|
const run = () => {
|
|
console.log('🛠 Compiling & Testing...')
|
|
exec('yarn test', function (error, stdout, stderr) {
|
|
console.log(stdout)
|
|
if (error) console.log(error)
|
|
if (stderr) console.log(stderr)
|
|
})
|
|
}
|
|
|
|
console.log('🔬 Watching Contracts...')
|
|
watch('./src', { recursive: true }, function (evt, name) {
|
|
console.log('%s changed.', name)
|
|
run()
|
|
})
|
|
|
|
watch('./test', { recursive: true }, function (evt, name) {
|
|
console.log('%s changed.', name)
|
|
run()
|
|
})
|
|
|
|
run()
|