revert original changes, sorry Ramos

This commit is contained in:
Jonathan Rainville 2018-06-14 16:57:38 -04:00
parent dac06c10ea
commit 930aa72bc6
1 changed files with 2 additions and 8 deletions

View File

@ -16,16 +16,13 @@ class Compiler {
let pluginCompilers = self.plugins.getPluginsProperty('compilers', 'compilers'); let pluginCompilers = self.plugins.getPluginsProperty('compilers', 'compilers');
pluginCompilers.forEach(function (compilerObject) { pluginCompilers.forEach(function (compilerObject) {
if(!available_compilers[compilerObject.extension]){ available_compilers[compilerObject.extension] = compilerObject.cb;
available_compilers[compilerObject.extension] = [];
}
available_compilers[compilerObject.extension].push(compilerObject.cb);
}); });
let compiledObject = {}; let compiledObject = {};
async.eachObject(available_compilers, async.eachObject(available_compilers,
function (extension, compilers, callback) { function (extension, compiler, callback) {
let matchingFiles = contractFiles.filter(function (file) { let matchingFiles = contractFiles.filter(function (file) {
let fileMatch = file.filename.match(/\.[0-9a-z]+$/); let fileMatch = file.filename.match(/\.[0-9a-z]+$/);
if (fileMatch && (fileMatch[0] === extension)) { if (fileMatch && (fileMatch[0] === extension)) {
@ -38,9 +35,6 @@ class Compiler {
if (!matchingFiles || !matchingFiles.length) { if (!matchingFiles || !matchingFiles.length) {
return callback(); return callback();
} }
let compiler = compilers[0];
compiler.call(compiler, matchingFiles, function (err, compileResult) { compiler.call(compiler, matchingFiles, function (err, compileResult) {
Object.assign(compiledObject, compileResult); Object.assign(compiledObject, compileResult);
callback(err, compileResult); callback(err, compileResult);