re-add context code

This commit is contained in:
Iuri Matias 2018-08-29 16:26:12 -04:00
parent 262a6d3aef
commit af947910c4
2 changed files with 10 additions and 8 deletions

View File

@ -1,5 +1,7 @@
whenEnvIsLoaded(function(){ whenEnvIsLoaded(function(){
<%- block %> __mainContext.__loadManagerInstance.doFirst(function(done) {
<%- block %>
});
if (EmbarkJS) { if (EmbarkJS) {
EmbarkJS.environment = "<%- environment %>"; EmbarkJS.environment = "<%- environment %>";

View File

@ -103,12 +103,12 @@ class CodeGenerator {
}); });
} }
generateContext() { //generateContext() {
let result = ""; // let result = "";
result += Templates.main_context(); // result += Templates.main_context();
result += Templates.load_manager(); // result += Templates.load_manager();
return result; // return result;
} //}
generateProvider(isDeployment) { generateProvider(isDeployment) {
let self = this; let self = this;
@ -386,7 +386,7 @@ class CodeGenerator {
let providerCode = self.generateProvider(false); let providerCode = self.generateProvider(false);
code += providerCode; code += providerCode;
code += "\nglobal.__embarkContext = __mainContext.__loadManagerInstance;\n"; //code += "\nglobal.__embarkContext = __mainContext.__loadManagerInstance;\n";
code += "\nexport default web3;\n"; code += "\nexport default web3;\n";
next(null, code); next(null, code);
} }