fix(core): Refactor TsWatch class to improve website execution handling

This commit is contained in:
2024-12-09 19:16:02 +01:00
parent 37f45a4912
commit 340efa5720
6 changed files with 244 additions and 35 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@git.zone/tswatch',
version: '2.0.36',
description: 'watch typescript projects during development'
version: '2.0.37',
description: 'A development tool for automatically watching and re-compiling TypeScript projects upon detecting file changes, enhancing developer workflows.'
}

View File

@ -128,15 +128,13 @@ export class TsWatch {
tsfolders = tsfolders.filter(
(itemArg) => itemArg.startsWith('ts') && itemArg !== 'ts_web'
);
const smartshellInstance = new plugins.smartshell.Smartshell({
executor: 'bash',
});
for (const tsfolder of tsfolders) {
this.watcherMap.add(
new Watcher({
filePathToWatch: plugins.path.join(paths.cwd, `./${tsfolder}/`),
functionToCall: async () => {
await websiteExecution.restart();
await bundleAndReloadWebsite();
},
timeout: null,
})