chore(scripts/dev): exit on tsconfig change

This commit is contained in:
PalmDevs 2025-05-02 22:05:43 +07:00
parent 3807f7c944
commit 493a671e9c
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -12,7 +12,7 @@ console.info(chalk.redBright(`\nRevenge ${chalk.white(`v${pkg.version}`)}\n`))
const cwdify = (path: string) => join(process.cwd(), path)
const Sources = ['src', 'lib', 'plugins'].map(cwdify)
const ExitTriggers = ['scripts', 'shims', 'package.json', 'bun.lock'].map(cwdify)
const ExitTriggers = ['scripts', 'shims', 'package.json', 'bun.lock', 'tsconfig.json'].map(cwdify)
const debouncedBuildDev = debounce(() => ((needRebuild = false), build(true).catch(console.error)), 250)
@ -22,7 +22,7 @@ watcher.subscribe(process.cwd(), (err, events) => {
if (err) return console.error(err)
if (events.some(it => ExitTriggers.some(se => it.path.startsWith(se)))) {
console.error(chalk.redBright('\u26A0 Scripts or packages has changed, exiting!'))
console.error(chalk.redBright('\u26A0 Scripts, packages, shims, or tsconfig.json has changed, exiting!'))
process.exit()
}