mirror of
https://github.com/embarklabs/embark.git
synced 2025-02-27 21:00:46 +00:00
Update compiler.js
This commit is contained in:
parent
f864bb6098
commit
078e3240db
@ -34,7 +34,6 @@ Compiler.prototype.compile_solidity = function(contractFiles) {
|
|||||||
compiled_object[className].info = {};
|
compiled_object[className].info = {};
|
||||||
compiled_object[className].info.abiDefinition = JSON.parse(contract.interface);
|
compiled_object[className].info.abiDefinition = JSON.parse(contract.interface);
|
||||||
}
|
}
|
||||||
//console.log(compiled_object);
|
|
||||||
|
|
||||||
return compiled_object;
|
return compiled_object;
|
||||||
};
|
};
|
||||||
@ -82,7 +81,6 @@ Compiler.prototype.compile_serpent = function(contractFile) {
|
|||||||
Compiler.prototype.compile = function(contractFiles) {
|
Compiler.prototype.compile = function(contractFiles) {
|
||||||
var solidity = [], serpent = [];
|
var solidity = [], serpent = [];
|
||||||
|
|
||||||
|
|
||||||
for (var i = 0; i < contractFiles.length; i++) {
|
for (var i = 0; i < contractFiles.length; i++) {
|
||||||
var extension = contractFiles[i].split('.')[1];
|
var extension = contractFiles[i].split('.')[1];
|
||||||
if (extension === 'sol') {
|
if (extension === 'sol') {
|
||||||
@ -95,7 +93,7 @@ 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);
|
if (solidity.length > 0) return this.compile_solidity(solidity);
|
||||||
if (serpent.length > 0) return this.compile_serpent(serpent);
|
if (serpent.length > 0) return this.compile_serpent(serpent);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user