Skip to content

Commit 217f905

Browse files
committed
Initialize xterm.js
1 parent cb5d7cf commit 217f905

5 files changed

Lines changed: 37 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,6 @@ cython_debug/
161161

162162
# VS Code configuration
163163
.vscode/
164+
165+
# JavaScript
166+
web/node_modules

‎web/index.html‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<link rel="stylesheet" href="style.css" />
5+
<link rel="stylesheet" href="node_modules/@xterm/xterm/css/xterm.css" />
6+
<script src="node_modules/@xterm/xterm/lib/xterm.js"></script>
7+
</head>
8+
9+
<body>
10+
<div id="terminal"></div>
11+
<script>
12+
var term = new Terminal();
13+
term.open(document.getElementById('terminal'));
14+
term.write('Hello from \x1B[1;3;31mxterm.js\x1B[0m $ ')
15+
</script>
16+
</body>
17+
</html>

‎web/package.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"dependencies": {
3+
"@xterm/xterm": "^5.5.0"
4+
}
5+
}

‎web/style.css‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
html, body, #terminal, .terminal {
2+
width: 100%;
3+
height: 100%;
4+
}

‎web/yarn.lock‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
"@xterm/xterm@^5.5.0":
6+
version "5.5.0"
7+
resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.5.0.tgz#275fb8f6e14afa6e8a0c05d4ebc94523ff775396"
8+
integrity sha512-hqJHYaQb5OptNunnyAnkHyM8aCjZ1MEIDTQu1iIbbTD/xops91NB5yq1ZK/dC2JDbVWtF23zUtl9JE2NqwT87A==

0 commit comments

Comments
 (0)