From 582447386338fc0a88cf8919626fde09c7961a39 Mon Sep 17 00:00:00 2001 From: Alexander Olsson Date: Tue, 12 Apr 2016 20:24:04 +0200 Subject: [PATCH] Initial migration to xterm.js --- lib/build-view.js | 4 ++-- package.json | 2 +- styles/build.less | 10 ++++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/build-view.js b/lib/build-view.js index 78606e8c..491521c5 100644 --- a/lib/build-view.js +++ b/lib/build-view.js @@ -32,7 +32,7 @@ export default class BuildView extends View { } constructor(...args) { - const Terminal = require('term.js'); + const Terminal = require('xterm'); super(...args); this.starttime = new Date(); this.terminal = new Terminal({ @@ -51,7 +51,7 @@ export default class BuildView extends View { this.fontGeometry = { w: 15, h: 15 }; this.terminal.open(this.output[0]); this.destroyTerminal = ::(this.terminal).destroy; - this.terminal.destroy = this.terminal.destroySoon = () => {}; // This terminal will be open forever and reset when necessary + this.terminal.destroy = () => {}; // This terminal will be open forever and reset when necessary this.terminalEl = $(this.terminal.element); this.terminalEl[0].terminal = this.terminal; // For testing purposes diff --git a/package.json b/package.json index bee70e83..a72826bf 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "getmac": "^1.0.7", "js-yaml": "^3.4.6", "node-uuid": "^1.4.3", - "term.js": "git+https://github.com/jeremyramin/term.js.git#de1635fc2695e7d8165012d3b1d007d7ce60eea2", + "xterm":"^0.32.0", "tree-kill": "^1.0.0", "xregexp": "^3.1.0" }, diff --git a/styles/build.less b/styles/build.less index 913371cf..8098d19b 100644 --- a/styles/build.less +++ b/styles/build.less @@ -1,5 +1,6 @@ @import "ui-variables"; @import "animations"; +@import "node_modules/xterm/src/xterm.css"; .build { @@ -107,3 +108,12 @@ color: @text-color-error; } } + +.terminal .xterm-helper-textarea { + display: none; + // text-indent: -9999em; + // opacity: 0; + // width: 0; + // height: 0; + // z-index: -10; +} \ No newline at end of file