-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathindex.ts
36 lines (31 loc) · 863 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import './css/scrollbar.css'
import './css/ansi.css'
import './css/style.css'
import 'vue-json-viewer/style.css'
import type {App} from 'vue'
import TerminalApi, {configMaxStoredCommandCountPerInstance, configStoreName, configTheme} from "./common/api"
import Terminal from "./Terminal.vue"
import {TerminalAsk, TerminalFlash, VueWebTerminal} from "./types"
import {getStore, initStore} from "~/common/store";
const install = (app: App): void => {
initStore()
app.component(Terminal.__name as string, Terminal)
}
const createTerminal = (): VueWebTerminal => {
return {
install,
configTheme,
configStoreName,
configMaxStoredCommandCountPerInstance
}
}
export * from './types'
export {
Terminal,
TerminalApi,
TerminalAsk,
TerminalFlash,
createTerminal,
getStore
}
export default Terminal