import web3 object on contract import

This commit is contained in:
Iuri Matias 2017-12-12 13:51:14 -05:00
parent b7b5fae2c8
commit 99a66a05ef
3 changed files with 8 additions and 6 deletions

View File

@ -437,6 +437,7 @@ class Pipeline {
//let EmbarkJSLib = fs.readFileSync(fs.embarkPath("js/embark.js")).toString();
let contractCode = "";
contractCode += "import web3 from 'Embark/web3';\n";
contractCode += "import EmbarkJS from 'Embark/EmbarkJS';\n";
contractCode += "let " + contractName + "JSONConfig = " + contractJSON + ";\n";
//contractCode += contractName + "JSONConfig.web3 = window.web3;\n";

View File

@ -1,6 +1,6 @@
import web3 from 'Embark/web3';
console.log("foo");
console.log(web3);
//import web3 from 'Embark/web3';
//console.log("foo");
//console.log(web3);
const FOO = "dude";

View File

@ -1,13 +1,14 @@
/*globals $, SimpleStorage, document*/
import $ from './_vendor/jquery.min';
import web3 from 'Embark/web3';
console.log("new_index");
console.log(web3);
//import web3 from 'Embark/web3';
//console.log("new_index");
//console.log(web3);
//window.web3 = web3;
//console.log("finished importing web3");
import EmbarkJS from 'Embark/EmbarkJS';
import SimpleStorage from 'Embark/contracts/SimpleStorage';
//import web3 from 'Embark/web3';
console.log("SimpleStorage")
console.log(SimpleStorage);