We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 188ac21 commit e70ba50Copy full SHA for e70ba50
watch.ts
@@ -23,10 +23,10 @@ class SingleTaskPool {
23
}
24
25
26
-export async function watchBuild(build: () => Promise<any>, paths: string[]) {
+export function watchBuild(build: () => Promise<any>, paths: string[]) {
27
const wrapper = new SingleTaskPool(build);
28
wrapper.run();
29
- for (const path of paths) {
30
- watch(path, { recursive: true }, () => wrapper.run());
31
- }
+ return paths.map((path) =>
+ watch(path, { recursive: true }, () => wrapper.run())
+ );
32
0 commit comments