move basic import so it's always available

This commit is contained in:
Iuri Matias 2017-12-12 14:37:47 -05:00
parent 99a66a05ef
commit a174b94702
2 changed files with 5 additions and 12 deletions

View File

@ -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');

View File

@ -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);