From 8ad26eb3584d0972d7f88a2668488e69c728c5f4 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Wed, 4 Dec 2024 22:04:41 +0100 Subject: [PATCH] fix(tswatch): Add logging to notify folder watcher creation and building processes --- changelog.md | 6 ++++++ ts/00_commitinfo_data.ts | 2 +- ts/tswatch.classes.tswatch.ts | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index efe1df7..8f30fc7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2024-12-04 - 2.0.28 - fix(tswatch) +Add logging to notify folder watcher creation and building processes + +- Logging added to notify the creation of folder watchers. +- Logging added to indicate the start of the building process for folders. + ## 2024-12-04 - 2.0.27 - fix(core) Refactor watch mode commands and exports diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index aa28f8e..51558c5 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@git.zone/tswatch', - version: '2.0.27', + version: '2.0.28', description: 'watch typescript projects during development' } diff --git a/ts/tswatch.classes.tswatch.ts b/ts/tswatch.classes.tswatch.ts index ee5a82e..c3677a4 100644 --- a/ts/tswatch.classes.tswatch.ts +++ b/ts/tswatch.classes.tswatch.ts @@ -3,6 +3,7 @@ import * as paths from './tswatch.paths.js'; import * as interfaces from './interfaces/index.js'; import { Watcher } from './tswatch.classes.watcher.js'; +import { logger } from './tswatch.logging.js'; export class TsWatch { public watchmode: interfaces.TWatchModes; @@ -84,10 +85,12 @@ export class TsWatch { executor: 'bash', }); for (const tsfolder of tsfolders) { + logger.log('info', `creating watcher for folder ${tsfolder}`); this.watcherMap.add( new Watcher({ filePathToWatch: plugins.path.join(paths.cwd, `./${tsfolder}/`), functionToCall: async () => { + logger.log('info', `building ${tsfolder}`); await smartshellInstance.exec(`npm run build`); await this.typedserver.reload(); },