Compare commits

...

2 commits

Author SHA1 Message Date
f293cbd05f Add some output 2024-08-17 06:24:10 -04:00
96b093fcf5 Fix hardcoded paths 2024-08-17 06:23:02 -04:00
2 changed files with 4 additions and 4 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -98,22 +98,22 @@ function mergeSourcemaps(sourcemaps: RojoSourcemap[]): RojoSourcemap {
}
async function rebuild() {
const sourcemaps = await Promise.all([
getPrefixedSourcemap('Secret'),
getPrefixedSourcemap('Core'),
])
const sourcemaps = await Promise.all(SOURCE_ROOTS.map(getPrefixedSourcemap))
const sourcemap = mergeSourcemaps(sourcemaps)
await fs.promises.writeFile(
'sourcemap.json',
JSON.stringify(sourcemap, null, 2),
)
console.log('Sourcemap rebuilt.')
}
for (const root of SOURCE_ROOTS) {
fs.watch(root, { recursive: true }, () => {
console.log(`Detected change in ${root}, rebuilding sourcemap...`)
sourcemapCache.delete(root)
rebuild()
})
}
console.log('Rebuilding sourcemap...')
rebuild()