fix(core): Fixed website watch mode execution method
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tswatch',
|
||||
version: '2.0.34',
|
||||
version: '2.0.35',
|
||||
description: 'watch typescript projects during development'
|
||||
}
|
||||
|
@ -118,6 +118,7 @@ export class TsWatch {
|
||||
break;
|
||||
case 'website':
|
||||
await (async () => {
|
||||
const websiteExecution = new plugins.smartshell.SmartExecution('npm run startTs');
|
||||
const bundleAndReloadWebsite = async () => {
|
||||
await tsbundle.build(paths.cwd, './ts_web/index.ts', './dist_serve/bundle.js', {
|
||||
bundler: 'esbuild',
|
||||
@ -134,7 +135,9 @@ export class TsWatch {
|
||||
this.watcherMap.add(
|
||||
new Watcher({
|
||||
filePathToWatch: plugins.path.join(paths.cwd, `./${tsfolder}/`),
|
||||
commandToExecute: `npm run startTs`,
|
||||
functionToCall: async () => {
|
||||
await websiteExecution.restart();
|
||||
},
|
||||
timeout: null,
|
||||
})
|
||||
);
|
||||
|
Reference in New Issue
Block a user