Skip to content

Commit

Permalink
fix(@embark/cli): start the dashboard after services are started
Browse files Browse the repository at this point in the history
Start the `embark run` dashboard after services have been started so the REPL
instantiated by the dashboard can successfully request the `console:history`
event.

Delete `cmd/dashboard/command_history.js` since it's no longer in use.
  • Loading branch information
michaelsbradleyjr authored and iurimatias committed Dec 20, 2018
1 parent e3a7b74 commit 6c7782c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 60 deletions.
35 changes: 18 additions & 17 deletions src/cmd/cmd_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,6 @@ class EmbarkController {
callback();
});
},
function startDashboard(callback) {
if (!options.useDashboard) {
return callback();
}

let dashboard = new Dashboard({
events: engine.events,
logger: engine.logger,
plugins: engine.plugins,
version: self.version,
env: engine.env
});
dashboard.start(function () {
engine.logger.info(__('dashboard start'));
callback();
});
},
function (callback) {
let pluginList = engine.plugins.listPlugins();
if (pluginList.length > 0) {
Expand Down Expand Up @@ -168,6 +151,24 @@ class EmbarkController {
}
engine.startService("fileWatcher");
callback();
},
function startDashboard(callback) {
if (!options.useDashboard) {
return callback();
}

let dashboard = new Dashboard({
events: engine.events,
logger: engine.logger,
plugins: engine.plugins,
version: self.version,
env: engine.env,
ipc: engine.ipc
});
dashboard.start(function () {
engine.logger.info(__('dashboard start'));
callback();
});
}
], function (err, _result) {
if (err) {
Expand Down
43 changes: 0 additions & 43 deletions src/cmd/dashboard/command_history.js

This file was deleted.

0 comments on commit 6c7782c

Please sign in to comment.