From 25a58980519f0330f6e063e2d77d228f450cc4b4 Mon Sep 17 00:00:00 2001 From: Aakil Fernandes Date: Sat, 30 Jan 2016 11:40:36 -0500 Subject: [PATCH 1/3] use last part of contract file rather than 1st --- lib/compiler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/compiler.js b/lib/compiler.js index 253bbc13..9a310578 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -74,7 +74,8 @@ Compiler.prototype.compile_serpent = function(contractFile) { Compiler.prototype.compile = function(contractFile) { - var extension = contractFile.split('.')[1]; + var contractFileParts = contractFile.split('.')[1] + ,extension = contractFileParts[contractFileParts.length-1]; if (extension === 'sol') { return this.compile_solidity(contractFile); From bf7a8ba00fbaacb2517629c7f4130089859c38d5 Mon Sep 17 00:00:00 2001 From: Aakil Fernandes Date: Sat, 30 Jan 2016 12:16:11 -0500 Subject: [PATCH 2/3] drop extra [1] --- lib/compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compiler.js b/lib/compiler.js index 9a310578..6c0a550f 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -74,7 +74,7 @@ Compiler.prototype.compile_serpent = function(contractFile) { Compiler.prototype.compile = function(contractFile) { - var contractFileParts = contractFile.split('.')[1] + var contractFileParts = contractFile.split('.') ,extension = contractFileParts[contractFileParts.length-1]; if (extension === 'sol') { From cb0ac1e3caf10fad95d821b55939aa418266d51f Mon Sep 17 00:00:00 2001 From: Aakil Fernandes Date: Sat, 30 Jan 2016 11:40:36 -0500 Subject: [PATCH 3/3] use last part of contract file rather than 1st --- lib/compiler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/compiler.js b/lib/compiler.js index 6c2866df..146ecd5a 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -89,7 +89,9 @@ Compiler.prototype.compile = function(contractFiles) { var solidity = [], serpent = []; for (var i = 0; i < contractFiles.length; i++) { - var extension = contractFiles[i].split('.')[1]; + var contractParts = contractFiles[i].split('.'), + extension = contractParts[contractParts.length-1] + if (extension === 'sol') { solidity.push(contractFiles[i]); }