Update compiler.js

This commit is contained in:
VoR0220 2015-10-26 10:47:04 -05:00 committed by Iuri Matias
parent f2e4333d1e
commit 867b7a16fc
1 changed files with 3 additions and 10 deletions

View File

@ -14,18 +14,11 @@ Compiler.prototype.init = function(env) {
Compiler.prototype.compile_solidity = function(contractFiles) {
console.log(contractFiles.length);
var source = '{ \n';
var sources = {}
for (var i = 0; i < contractFiles.length; i++){
source += '\'' + contractFiles[i] + '\': \''
var file = fs.readFileSync(contractFiles[i]).toString();
source += file + '\'\n';
if (i < contractFiles.length - 1) source += ', \n'
sources[contractFiles[i]] = fs.readFileSync(contractFiles[i]).toString();
}
source += '\n}';
var output = solc.compile(source, 1);