fix(embark/dashboard): show command in the dashboard

This commit is contained in:
Jonathan Rainville 2019-03-12 13:24:48 -04:00 committed by Iuri Matias
parent 6f5efb16a6
commit 54698ccf53
2 changed files with 7 additions and 1 deletions

View File

@ -176,7 +176,8 @@ class Engine {
version: this.version,
ipc: this.ipc,
logger: this.logger,
config: this.config
config: this.config,
useDashboard: this.useDashboard
});
}

View File

@ -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);
}