mirror of https://github.com/embarklabs/embark.git
fix(embark/dashboard): show command in the dashboard
This commit is contained in:
parent
6f5efb16a6
commit
54698ccf53
|
@ -176,7 +176,8 @@ class Engine {
|
|||
version: this.version,
|
||||
ipc: this.ipc,
|
||||
logger: this.logger,
|
||||
config: this.config
|
||||
config: this.config,
|
||||
useDashboard: this.useDashboard
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue