mirror of https://github.com/embarklabs/embark.git
re-add context code
This commit is contained in:
parent
262a6d3aef
commit
af947910c4
|
@ -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 %>";
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue