fix(cli): replace npmextra config loading with smartconfig
This commit is contained in:
@@ -53,8 +53,8 @@ export class TsRustCli {
|
||||
constructor(cwd: string = process.cwd()) {
|
||||
this.cwd = cwd;
|
||||
this.cli = new plugins.smartcli.Smartcli();
|
||||
const npmextraInstance = new plugins.npmextra.Npmextra(this.cwd);
|
||||
this.config = npmextraInstance.dataFor<ITsrustConfig>('@git.zone/tsrust', { targets: [] });
|
||||
const smartconfigInstance = new plugins.smartconfig.Smartconfig(this.cwd);
|
||||
this.config = smartconfigInstance.dataFor<ITsrustConfig>('@git.zone/tsrust', { targets: [] });
|
||||
this.registerCommands();
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ export class TsRustCli {
|
||||
const distDir = path.join(this.cwd, 'dist_rust');
|
||||
const profile = isDebug ? 'debug' : 'release';
|
||||
|
||||
// Parse --target flag (can appear multiple times), fall back to npmextra.json config
|
||||
// Parse --target flag (can appear multiple times), fall back to smartconfig.json config
|
||||
const cliTargets = (argvArg as any).target;
|
||||
const targets: string[] = cliTargets
|
||||
? (Array.isArray(cliTargets) ? cliTargets : [cliTargets])
|
||||
|
||||
Reference in New Issue
Block a user