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');
|
||||
|
||||
class Dashboard {
|
||||
constructor(options) {
|
||||
let title = (options && options.title) || "Embark " + options.version;
|
||||
constructor(_options) {
|
||||
let options = _options || {};
|
||||
this.env = options.env;
|
||||
this.console = options.console;
|
||||
this.history = new CommandHistory();
|
||||
|
||||
this.color = (options && options.color) || "green";
|
||||
this.minimal = (options && options.minimal) || false;
|
||||
this.color = options.color || "green";
|
||||
this.minimal = options.minimal || false;
|
||||
|
||||
this.screen = blessed.screen({
|
||||
smartCSR: true,
|
||||
title: title,
|
||||
title: options.title || ("Embark " + options.version),
|
||||
dockBorders: false,
|
||||
fullUnicode: true,
|
||||
autoPadding: true
|
||||
|
|
Loading…
Reference in New Issue