fix(config): use .smartconfig.json consistently and pass asset copy paths explicitly

This commit is contained in:
2026-05-09 12:33:39 +00:00
parent 7a1dbbff21
commit f2e843b72e
10 changed files with 2416 additions and 1511 deletions
+6 -3
View File
@@ -9,7 +9,7 @@ import { logger } from './tswatch.logging.js';
/**
* TsWatch - Config-driven file watcher
*
* Reads configuration from smartconfig.json under the key '@git.zone/tswatch'
* Reads configuration from .smartconfig.json under the key '@git.zone/tswatch'
* and sets up watchers, bundles, and dev server accordingly.
*/
export class TsWatch {
@@ -27,7 +27,7 @@ export class TsWatch {
}
/**
* Create TsWatch from smartconfig.json configuration
* Create TsWatch from .smartconfig.json configuration
*/
public static fromConfig(cwdArg?: string): TsWatch | null {
const configHandler = new ConfigHandler(cwdArg);
@@ -136,7 +136,10 @@ export class TsWatch {
});
} else if (fromPath.endsWith('/') || !fromPath.includes('.')) {
// Assets directory copy
await this.assetsHandler.processAssets();
await this.assetsHandler.processAssets({
from: bundleConfig.from,
to: bundleConfig.to,
});
} else if (bundleConfig.outputMode && bundleConfig.outputMode !== 'bundle') {
// Non-default outputMode (e.g. base64ts) — use CustomBundleHandler
await this.customBundleHandler.processSingleBundle({