Merge pull request #634 from embark-framework/embarkjs-environment

Add environment to EmbarkJS
This commit is contained in:
Iuri Matias 2018-07-19 10:55:30 +03:00 committed by GitHub
commit 65b29d5db6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 %>";
});