Add some output

This commit is contained in:
yname 2024-08-17 06:24:10 -04:00
parent 96b093fcf5
commit f293cbd05f

View file

@ -104,13 +104,16 @@ async function rebuild() {
'sourcemap.json', 'sourcemap.json',
JSON.stringify(sourcemap, null, 2), JSON.stringify(sourcemap, null, 2),
) )
console.log('Sourcemap rebuilt.')
} }
for (const root of SOURCE_ROOTS) { for (const root of SOURCE_ROOTS) {
fs.watch(root, { recursive: true }, () => { fs.watch(root, { recursive: true }, () => {
console.log(`Detected change in ${root}, rebuilding sourcemap...`)
sourcemapCache.delete(root) sourcemapCache.delete(root)
rebuild() rebuild()
}) })
} }
console.log('Rebuilding sourcemap...')
rebuild() rebuild()