-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathumd.html
53 lines (53 loc) · 1.32 KB
/
umd.html
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shikitor</title>
<script type="importmap">
{
"imports": {
"shiki": "https://cdn.jsdelivr.net/npm/shiki@^1.6.2/+esm",
"@shikijs/core": "https://cdn.jsdelivr.net/npm/@shikijs/core@^1.6.2/+esm"
}
}
</script>
<style>
html, body {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
font-family: sans-serif;
font-size: 16px;
}
h1 {
margin: 0;
padding: 1rem;
background-color: #333;
color: #fff;
text-align: center;
}
</style>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/@shikitor/core/dist/index.css'>
</head>
<body>
<h1>Shikitor</h1>
<div id="app" style="height: 100%"></div>
<script type='module'>
import * as shiki from 'shiki';
import * as ShikiCore from '@shikijs/core';
globalThis.shiki = shiki;
globalThis.ShikiCore = ShikiCore;
</script>
<script type='module' src="https://cdn.jsdelivr.net/npm/@shikitor/core"></script>
<script type='module'>
const { create } = ShikitorCore;
const shikitor = create(document.querySelector('#app'), {
theme: 'github-light',
lang: 'javascript',
value: `console.log('Hello, Shikitor!');`,
plugins: []
});
</script>
</body>
</html>