From 54698ccf532e136a0a2e1258d4c3f09580a2103a Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 12 Mar 2019 13:24:48 -0400 Subject: [PATCH] fix(embark/dashboard): show command in the dashboard --- packages/embark/src/lib/core/engine.js | 3 ++- packages/embark/src/lib/modules/console/index.ts | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/embark/src/lib/core/engine.js b/packages/embark/src/lib/core/engine.js index 3f532dd40..0d5e4a51b 100644 --- a/packages/embark/src/lib/core/engine.js +++ b/packages/embark/src/lib/core/engine.js @@ -176,7 +176,8 @@ class Engine { version: this.version, ipc: this.ipc, logger: this.logger, - config: this.config + config: this.config, + useDashboard: this.useDashboard }); } diff --git a/packages/embark/src/lib/modules/console/index.ts b/packages/embark/src/lib/modules/console/index.ts index 172264e25..d9625f688 100644 --- a/packages/embark/src/lib/modules/console/index.ts +++ b/packages/embark/src/lib/modules/console/index.ts @@ -30,6 +30,7 @@ class Console { private cmdHistoryFile: string; private suggestions?: Suggestions; private providerReady: boolean; + private useDashboard: boolean; constructor(embark: Embark, options: any) { this.embark = embark; @@ -40,6 +41,7 @@ class Console { this.fs = embark.fs; this.ipc = options.ipc; this.config = options.config; + this.useDashboard = options.useDashboard; this.history = []; this.cmdHistoryFile = options.cmdHistoryFile || this.fs.dappPath(".embark", "cmd_history"); this.providerReady = false; @@ -151,6 +153,9 @@ class Console { return this.ipc.request("console:executeCmd", cmd, callback); } + if (this.useDashboard) { + this.logger.info("console > ".cyan + cmd.white); + } if (!(cmd.split(" ")[0] === "history" || cmd === __("history"))) { this.saveHistory(cmd); }