From 59478f19ff00d126c531d53c4faab5c28dacbfa6 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 7 Jul 2018 16:34:56 +0300 Subject: [PATCH 1/4] remove unused parameter --- lib/dashboard/dashboard.js | 2 -- lib/index.js | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/dashboard/dashboard.js b/lib/dashboard/dashboard.js index bc8c0c2a..b5e4bdff 100644 --- a/lib/dashboard/dashboard.js +++ b/lib/dashboard/dashboard.js @@ -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)); @@ -34,7 +33,6 @@ class Dashboard { events: self.events, plugins: self.plugins, version: self.version, - contractsConfig: self.contractsConfig }); callback(); }, diff --git a/lib/index.js b/lib/index.js index 032287e1..f4b9636a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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')); From 448593b36fa432e43ca5ddd40cce2ee6149eb4ce Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 7 Jul 2018 16:51:24 +0300 Subject: [PATCH 2/4] move asset files check from index to pipeline; index shouldn't know about the internals --- lib/index.js | 3 --- lib/pipeline/pipeline.js | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/index.js b/lib/index.js index f4b9636a..60e352b9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -211,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); diff --git a/lib/pipeline/pipeline.js b/lib/pipeline/pipeline.js index 7d7a0e54..16d37f6a 100644 --- a/lib/pipeline/pipeline.js +++ b/lib/pipeline/pipeline.js @@ -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) => { From 6bb8051d836539cbee00fd115ab07dd1c4766717 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Sat, 7 Jul 2018 16:59:00 +0300 Subject: [PATCH 3/4] add todo --- lib/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/index.js b/lib/index.js index 60e352b9..1ed62bfc 100644 --- a/lib/index.js +++ b/lib/index.js @@ -222,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(); } From 455753f990bde75368315a8721c31cfc80e2eb09 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Mon, 9 Jul 2018 11:15:13 +0300 Subject: [PATCH 4/4] make linter happy --- lib/dashboard/dashboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dashboard/dashboard.js b/lib/dashboard/dashboard.js index b5e4bdff..0bf7a7a5 100644 --- a/lib/dashboard/dashboard.js +++ b/lib/dashboard/dashboard.js @@ -32,7 +32,7 @@ class Dashboard { console = new Console({ events: self.events, plugins: self.plugins, - version: self.version, + version: self.version }); callback(); },