mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
Moved placeholder page html to code generator and ejs template.
This commit is contained in:
parent
db9fbef140
commit
ab738c05f9
@ -14,7 +14,8 @@ const Templates = {
|
||||
define_web3_simple: require('./code_templates/define-web3-simple.js.ejs'),
|
||||
web3_connector: require('./code_templates/web3-connector.js.ejs'),
|
||||
do_when_loaded: require('./code_templates/do-when-loaded.js.ejs'),
|
||||
exec_when_env_loaded: require('./code_templates/exec-when-env-loaded.js.ejs')
|
||||
exec_when_env_loaded: require('./code_templates/exec-when-env-loaded.js.ejs'),
|
||||
embark_building_placeholder: require('./code_templates/embark-building-placeholder.html.ejs')
|
||||
};
|
||||
|
||||
class CodeGenerator {
|
||||
@ -101,11 +102,15 @@ class CodeGenerator {
|
||||
self.buildWeb3JS(cb);
|
||||
});
|
||||
|
||||
self.events.setCommandHandler('code-generator:contract', (contractName, cb) => {
|
||||
this.events.setCommandHandler('code-generator:contract', (contractName, cb) => {
|
||||
let contract = self.contractsManager.contracts[contractName];
|
||||
self.buildContractJS(contractName, self.generateContractJSON(contractName, contract), cb);
|
||||
});
|
||||
|
||||
this.events.setCommandHandler('embark-building-placeholder', (cb) => {
|
||||
this.buildPlaceholderPage(cb);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
generateContext() {
|
||||
@ -384,6 +389,11 @@ class CodeGenerator {
|
||||
], cb);
|
||||
}
|
||||
|
||||
buildPlaceholderPage(cb) {
|
||||
let html = Templates.embark_building_placeholder({buildingMsg: __('Embark is building, please wait...')});
|
||||
cb(html);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = CodeGenerator;
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user