chore(scripts/dev): exit on tsconfig change
This commit is contained in:
parent
3807f7c944
commit
493a671e9c
1 changed files with 2 additions and 2 deletions
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue