Add environment to EmbarkJS

This commit is contained in:
Richard Ramos 2018-07-18 10:49:44 -04:00 committed by Iuri Matias
parent 21b4cbf60d
commit 38817ddab2
2 changed files with 4 additions and 2 deletions

View File

@ -139,7 +139,7 @@ class CodeGenerator {
web3Load = Templates.web3_connector({connectionList: connectionList, done: 'done(err);', warnAboutMetamask: isDev}); web3Load = Templates.web3_connector({connectionList: connectionList, done: 'done(err);', warnAboutMetamask: isDev});
} }
result += Templates.do_when_loaded({block: web3Load}); result += Templates.do_when_loaded({block: web3Load, environment: this.env});
} }
return result; return result;

View File

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