minor refactor: simplify options setting
This commit is contained in:
parent
fb8d3c4c0a
commit
26b070b27f
|
@ -2,18 +2,18 @@ let blessed = require("blessed");
|
||||||
let CommandHistory = require('./command_history.js');
|
let CommandHistory = require('./command_history.js');
|
||||||
|
|
||||||
class Dashboard {
|
class Dashboard {
|
||||||
constructor(options) {
|
constructor(_options) {
|
||||||
let title = (options && options.title) || "Embark " + options.version;
|
let options = _options || {};
|
||||||
this.env = options.env;
|
this.env = options.env;
|
||||||
this.console = options.console;
|
this.console = options.console;
|
||||||
this.history = new CommandHistory();
|
this.history = new CommandHistory();
|
||||||
|
|
||||||
this.color = (options && options.color) || "green";
|
this.color = options.color || "green";
|
||||||
this.minimal = (options && options.minimal) || false;
|
this.minimal = options.minimal || false;
|
||||||
|
|
||||||
this.screen = blessed.screen({
|
this.screen = blessed.screen({
|
||||||
smartCSR: true,
|
smartCSR: true,
|
||||||
title: title,
|
title: options.title || ("Embark " + options.version),
|
||||||
dockBorders: false,
|
dockBorders: false,
|
||||||
fullUnicode: true,
|
fullUnicode: true,
|
||||||
autoPadding: true
|
autoPadding: true
|
||||||
|
|
Loading…
Reference in New Issue