From 61e44b31e97a66e49c7e144a79e4bb47ecff5333 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sun, 2 Jul 2017 14:55:35 -0400 Subject: [PATCH] support specifying web3.js separetly --- lib/core/config.js | 5 +++++ test_app/embark.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/core/config.js b/lib/core/config.js index 016f9ca02..2c40419e0 100644 --- a/lib/core/config.js +++ b/lib/core/config.js @@ -256,6 +256,9 @@ Config.prototype.loadFiles = function(files) { readFiles.push({filename: file, content: web3Content, path: fs.embarkPath("js/web3.js")}); }); } + if (file === "web3.js") { + readFiles.push({filename: 'web3.js', content: fs.readFileSync(fs.embarkPath("js/web3.js")).toString(), path: fs.embarkPath("js/web3.js")}); + } }); // get plugins @@ -290,6 +293,8 @@ Config.prototype.loadFiles = function(files) { return; } else if (file.indexOf("web3-") === 0) { return; + } else if (file.indexOf("web3") === 0) { + return; } else if (file === 'abi.js') { readFiles.push({filename: file, content: "", path: file}); } else { diff --git a/test_app/embark.json b/test_app/embark.json index fa679dc7b..330d6fd82 100644 --- a/test_app/embark.json +++ b/test_app/embark.json @@ -11,7 +11,8 @@ "index.html": "app/index.html", "test.html": "app/test.html", "test2.html": "app/test2.html", - "js/myweb3.js": "web3-0.18.js" + "js/myweb3.js": "web3-0.18.js", + "js/web3.js": "web3.js" }, "buildDir": "dist/", "config": "config/",