From a174b94702d294c628c8c7cec31a8a412c02f93d Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Tue, 12 Dec 2017 14:37:47 -0500 Subject: [PATCH] move basic import so it's always available --- lib/pipeline/pipeline.js | 15 ++++----------- test_app/app/js/new_index.js | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/pipeline/pipeline.js b/lib/pipeline/pipeline.js index 8f8e4d675..c3b31bc3e 100644 --- a/lib/pipeline/pipeline.js +++ b/lib/pipeline/pipeline.js @@ -31,13 +31,10 @@ class Pipeline { self.logger.trace("reading " + file.filename); if (file.filename.indexOf('.js') >= 0) { - - console.log("---"); - console.log(fs.dappPath()); - console.log(file.filename); - console.log("---"); - let importsList = {}; + + importsList["Embark/EmbarkJS"] = fs.embarkPath("js/embark.js"); + async.waterfall([ function findImports(next) { webpack({ @@ -52,11 +49,7 @@ class Pipeline { callback(); } else { console.log("request " + request); - if (request === "Embark/EmbarkJS") { - importsList["Embark/EmbarkJS"] = fs.embarkPath("js/embark.js"); - } else if (request === "Embark/test") { - importsList["Embark/test"] = fs.embarkPath("js/test.js"); - } else if (request.indexOf('Embark/contracts/') === 0) { + if (request.indexOf('Embark/contracts/') === 0) { let contractName = request.split('/')[2]; let contractCode = self.buildContractJS(contractName); let filePath = utils.joinPath(fs.dappPath(), ".embark", contractName + '.js'); diff --git a/test_app/app/js/new_index.js b/test_app/app/js/new_index.js index fb423dd5b..6d8e70cac 100644 --- a/test_app/app/js/new_index.js +++ b/test_app/app/js/new_index.js @@ -8,7 +8,7 @@ import $ from './_vendor/jquery.min'; //console.log("finished importing web3"); import EmbarkJS from 'Embark/EmbarkJS'; import SimpleStorage from 'Embark/contracts/SimpleStorage'; -//import web3 from 'Embark/web3'; +import web3 from 'Embark/web3'; console.log("SimpleStorage") console.log(SimpleStorage);