Skip to content

Commit 61e44b3

Browse files
committed
support specifying web3.js separetly
1 parent 31ecaf0 commit 61e44b3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/core/config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,9 @@ Config.prototype.loadFiles = function(files) {
256256
readFiles.push({filename: file, content: web3Content, path: fs.embarkPath("js/web3.js")});
257257
});
258258
}
259+
if (file === "web3.js") {
260+
readFiles.push({filename: 'web3.js', content: fs.readFileSync(fs.embarkPath("js/web3.js")).toString(), path: fs.embarkPath("js/web3.js")});
261+
}
259262
});
260263

261264
// get plugins
@@ -290,6 +293,8 @@ Config.prototype.loadFiles = function(files) {
290293
return;
291294
} else if (file.indexOf("web3-") === 0) {
292295
return;
296+
} else if (file.indexOf("web3") === 0) {
297+
return;
293298
} else if (file === 'abi.js') {
294299
readFiles.push({filename: file, content: "", path: file});
295300
} else {

test_app/embark.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"index.html": "app/index.html",
1212
"test.html": "app/test.html",
1313
"test2.html": "app/test2.html",
14-
"js/myweb3.js": "web3-0.18.js"
14+
"js/myweb3.js": "web3-0.18.js",
15+
"js/web3.js": "web3.js"
1516
},
1617
"buildDir": "dist/",
1718
"config": "config/",

0 commit comments

Comments
 (0)