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
+5 -5
View File
@@ -56,10 +56,10 @@ export class TswatchInit {
config = { ...preset, preset: template as interfaces.ITswatchConfig['preset'] };
}
// Save to smartconfig.json
// Save to .smartconfig.json
await this.saveConfig(config);
console.log('\nConfiguration saved to smartconfig.json');
console.log('\nConfiguration saved to .smartconfig.json');
console.log('Run "tswatch" to start watching.\n');
return config;
@@ -166,12 +166,12 @@ export class TswatchInit {
}
/**
* Save configuration to smartconfig.json
* Save configuration to .smartconfig.json
*/
private async saveConfig(config: interfaces.ITswatchConfig): Promise<void> {
const smartconfigPath = plugins.path.join(paths.cwd, 'smartconfig.json');
const smartconfigPath = plugins.path.join(paths.cwd, '.smartconfig.json');
// Read existing smartconfig.json if it exists
// Read existing .smartconfig.json if it exists
let existingConfig: Record<string, any> = {};
try {
const smartfsInstance = new plugins.smartfs.SmartFs(new plugins.smartfs.SmartFsProviderNode());