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