join serpent and solidity contracts

This commit is contained in:
Iuri Matias 2016-10-15 08:22:18 -04:00
parent 969e4015cb
commit 5a6a9e8b94
1 changed files with 9 additions and 3 deletions

View File

@ -98,9 +98,15 @@ Compiler.prototype.compile = function(contractFiles) {
throw new Error("extension not known, got " + extension); throw new Error("extension not known, got " + extension);
} }
} }
//TODO: Get these compiling and returning together...problem might come with the JSON objects
if (solidity.length > 0) return this.compile_solidity(solidity); var contracts = [];
if (serpent.length > 0) return this.compile_serpent(serpent); if (solidity.length > 0) {
contracts.concat(this.compile_solidity(solidity));
}
if (serpent.length > 0) {
contracts.concat(this.compile_serpent(serpent));
}
return contracts;
}; };
module.exports = Compiler; module.exports = Compiler;