fix(config): rename smartconfig metadata file and update config-based compile references
This commit is contained in:
@@ -55,22 +55,22 @@ export class TsDeno {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads compile targets from npmextra.json and compiles each one.
|
||||
* Reads compile targets from ..smartconfig.json and compiles each one.
|
||||
* The package.json hide/restore wraps the entire loop.
|
||||
*/
|
||||
public async compileFromConfig(): Promise<void> {
|
||||
const npmextraInstance = new plugins.npmextra.Smartconfig(this.cwd);
|
||||
const config = npmextraInstance.dataFor<ITsdenoConfig>('@git.zone/tsdeno', {
|
||||
const smartconfigInstance = new plugins.smartconfig.Smartconfig(this.cwd);
|
||||
const config = smartconfigInstance.dataFor<ITsdenoConfig>('@git.zone/tsdeno', {
|
||||
compileTargets: [],
|
||||
});
|
||||
|
||||
if (config.compileTargets.length === 0) {
|
||||
console.error('tsdeno: no compileTargets found in smartconfig.json under "@git.zone/tsdeno"');
|
||||
console.error('tsdeno: either pass args directly or add config to smartconfig.json');
|
||||
console.error('tsdeno: no compileTargets found in .smartconfig.json under "@git.zone/tsdeno"');
|
||||
console.error('tsdeno: either pass args directly or add config to .smartconfig.json');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(`tsdeno: found ${config.compileTargets.length} compile target(s) in smartconfig.json`);
|
||||
console.log(`tsdeno: found ${config.compileTargets.length} compile target(s) in .smartconfig.json`);
|
||||
|
||||
const packageJsonPath = plugins.path.join(this.cwd, 'package.json');
|
||||
const backupPath = plugins.path.join(this.cwd, 'package.json.bak');
|
||||
|
||||
Reference in New Issue
Block a user