Compare commits

...

2 Commits

4 changed files with 11 additions and 2 deletions

View File

@@ -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

View File

@@ -1,6 +1,6 @@
{
"name": "@git.zone/tswatch",
"version": "2.0.27",
"version": "2.0.28",
"private": false,
"description": "watch typescript projects during development",
"main": "dist_ts/index.js",

View File

@@ -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'
}

View File

@@ -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();
},