fix(config): use .smartconfig.json consistently and pass asset copy paths explicitly
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user