Compare commits

...

2 Commits

Author SHA1 Message Date
Konnor Rogers
e81b98a6be prettier 2025-07-18 00:34:26 -04:00
Konnor Rogers
e6de71bc1b prevent infinite loop in build watcher 2025-07-18 00:33:42 -04:00

View File

@@ -389,7 +389,7 @@ export async function build(options = {}) {
const watchEvents = ['change', 'unlink', 'add'];
// Rebuild and reload when source files change
options.watchedSrcDirectories.forEach(dir => {
const watcher = bs.watch(join(dir, '**', '!(*.test).*'));
const watcher = bs.watch(join(dir, '**', '!(*.test).*'), { ignoreInitial: true });
watchEvents.forEach(evt => {
watcher.on(evt, handleWatchEvent(evt));
@@ -456,7 +456,7 @@ export async function build(options = {}) {
// Rebuild the docs and reload when the docs change
options.watchedDocsDirectories.forEach(dir => {
const watcher = bs.watch(join(dir, '**', '*.*'));
const watcher = bs.watch(join(dir, '**', '*.*'), { ignoreInitial: true });
watchEvents.forEach(evt => {
watcher.on(evt, handleWatchEvent(evt));