Add environment to EmbarkJS

This commit is contained in:
Richard Ramos 2018-07-18 10:49:44 -04:00
parent 07f600f756
commit c376cd9000
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});
}
result += Templates.do_when_loaded({block: web3Load});
result += Templates.do_when_loaded({block: web3Load, environment: this.env});
}
return result;

View File

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