19 lines
421 B
TypeScript
19 lines
421 B
TypeScript
import bundle from "./bundler.ts";
|
|
|
|
const directoryToWatch = "./src/client_js"; // Update this to your directory
|
|
|
|
const watcher = Deno.watchFs(directoryToWatch);
|
|
|
|
for await (const event of watcher) {
|
|
if (
|
|
event.kind === "modify" || event.kind === "create" ||
|
|
event.kind === "remove"
|
|
) {
|
|
try {
|
|
await bundle();
|
|
} catch (e) {
|
|
console.log(e);
|
|
}
|
|
}
|
|
}
|