Last active
May 4, 2022 19:33
-
-
Save kristoferjoseph/89373269912b9c710b3157ab49ae8a76 to your computer and use it in GitHub Desktop.
deno file watcher test runner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { exec } from "https://deno.land/x/exec/mod.ts"; | |
const watcher = Deno.watchFs("./"); | |
for await (const event of watcher) { | |
// if you're curious | |
// let kind = event.kind | |
// console.log('EVENT KIND: ', kind) | |
await exec('clear') | |
await exec('deno test --allow-read') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
run with:
deno run --allow-run --allow-read watch.ts