-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
42 lines (36 loc) · 921 Bytes
/
index.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
<html>
<!-- View this file with `pnpm dev:browser` -->
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="module">
import decoratorTransforms from 'decorator-transforms';
const output = Babel.transform(
`
import { tracked } from '@glimmer/tracking';
export class Demo {
@tracked count = 0;
increment = () => this.count++;
}
`,
{
plugins: [
// This plugin
[
decoratorTransforms,
{
runtime: {
import: 'decorator-transforms/globals',
},
},
],
],
},
);
document.querySelector('#output').innerHTML = output.code;
</script>
</head>
<body>
<pre id="output"></pre>
</body>
</html>