From 6273339f7c588f31f6c664a6aa3b58e2b94b9051 Mon Sep 17 00:00:00 2001 From: "F. Eugene Aumson" Date: Thu, 30 Aug 2018 09:54:10 -0400 Subject: add named references for returned objects --- packages/sol-compiler/src/compiler.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index d2977c691..3b0bd90f9 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -170,17 +170,20 @@ export class Compiler { * that version. */ public async getCompilerOutputsAsync(): Promise { - return this._compileContractsAsync(this._getContractNamesToCompile(), false); + const promisedOutputs = this._compileContractsAsync(this._getContractNamesToCompile(), false); + return promisedOutputs; } private _getContractNamesToCompile(): string[] { + let contractNamesToCompile; if (this._specifiedContracts === ALL_CONTRACTS_IDENTIFIER) { const allContracts = this._nameResolver.getAll(); - return _.map(allContracts, contractSource => + contractNamesToCompile = _.map(allContracts, contractSource => path.basename(contractSource.path, constants.SOLIDITY_FILE_EXTENSION), ); } else { - return this._specifiedContracts; + contractNamesToCompile = this._specifiedContracts; } + return contractNamesToCompile; } /** * Compiles contracts, and, if `shouldPersist` is true, saves artifacts to artifactsDir. -- cgit