mirror of
https://github.com/danbulant/design
synced 2026-05-19 04:08:46 +00:00
add xterm
This commit is contained in:
parent
eb987369fc
commit
6db46cbf0e
3 changed files with 23 additions and 1 deletions
|
|
@ -16,6 +16,7 @@
|
|||
"type": "module",
|
||||
"dependencies": {
|
||||
"@sveltejs/adapter-static": "^1.0.0-next.26",
|
||||
"luxon": "^2.3.1"
|
||||
"luxon": "^2.3.1",
|
||||
"xterm": "^4.18.0"
|
||||
}
|
||||
}
|
||||
|
|
@ -7,10 +7,12 @@ specifiers:
|
|||
luxon: ^2.3.1
|
||||
mdsvex: ^0.10.5
|
||||
svelte: ^3.44.0
|
||||
xterm: ^4.18.0
|
||||
|
||||
dependencies:
|
||||
'@sveltejs/adapter-static': 1.0.0-next.26
|
||||
luxon: 2.3.1
|
||||
xterm: 4.18.0
|
||||
|
||||
devDependencies:
|
||||
'@sveltejs/adapter-auto': 1.0.0-next.30
|
||||
|
|
@ -533,3 +535,7 @@ packages:
|
|||
optionalDependencies:
|
||||
fsevents: 2.3.2
|
||||
dev: true
|
||||
|
||||
/xterm/4.18.0:
|
||||
resolution: {integrity: sha512-JQoc1S0dti6SQfI0bK1AZvGnAxH4MVw45ZPFSO6FHTInAiau3Ix77fSxNx3mX4eh9OL4AYa8+4C8f5UvnSfppQ==}
|
||||
dev: false
|
||||
|
|
|
|||
15
src/lib/components/xterm.svelte
Normal file
15
src/lib/components/xterm.svelte
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<script>
|
||||
import { Terminal } from 'xterm';
|
||||
import "xterm/css/xterm.css";
|
||||
|
||||
const term = new Terminal();
|
||||
var div;
|
||||
export var terminal;
|
||||
|
||||
onMount(() => {
|
||||
term.open(div);
|
||||
terminal = term;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div bind:this={div}></div>
|
||||
Loading…
Reference in a new issue