Merge pull request #611 from embark-framework/refactor_cleanup

remove unneeded variables or bad coupling
This commit is contained in:
Iuri Matias 2018-07-09 11:18:11 +03:00 committed by GitHub
commit 7929abcdfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 9 deletions

View File

@ -11,7 +11,6 @@ class Dashboard {
this.plugins = options.plugins;
this.version = options.version;
this.env = options.env;
this.contractsConfig = options.contractsConfig;
this.events.on('firstDeploymentDone', this.checkWindowSize.bind(this));
this.events.on('outputDone', this.checkWindowSize.bind(this));
@ -33,8 +32,7 @@ class Dashboard {
console = new Console({
events: self.events,
plugins: self.plugins,
version: self.version,
contractsConfig: self.contractsConfig
version: self.version
});
callback();
},

View File

@ -101,8 +101,7 @@ class Embark {
logger: engine.logger,
plugins: engine.plugins,
version: self.version,
env: engine.env,
contractsConfig: engine.config.contractsConfig
env: engine.env
});
dashboard.start(function () {
engine.logger.info(__('dashboard start'));
@ -212,9 +211,6 @@ class Embark {
return callback(null, true);
}
engine.logger.info("Finished deploying".underline);
if (!engine.config.assetFiles || !Object.keys(engine.config.assetFiles).length) {
return callback();
}
engine.events.on('outputDone', (err) => {
engine.logger.info(__("finished building").underline);
callback(err, true);
@ -226,6 +222,7 @@ class Embark {
engine.logger.debug(err.stack);
}
// TODO: this should be moved out and determined somewhere else
if (canExit || !engine.config.contractsConfig.afterDeploy || !engine.config.contractsConfig.afterDeploy.length) {
process.exit();
}

View File

@ -4,7 +4,6 @@ const ProcessLauncher = require('../process/processLauncher');
const utils = require('../utils/utils.js');
const constants = require('../constants');
require("babel-preset-react");
require("babel-preset-es2015");
require("babel-preset-es2016");
@ -27,6 +26,10 @@ class Pipeline {
const importsList = {};
let placeholderPage;
if (!this.assetFiles || !Object.keys(this.assetFiles).length) {
return callback();
}
async.waterfall([
function createPlaceholderPage(next){
self.events.request('embark-building-placeholder', (html) => {