File tree 4 files changed +525
-8
lines changed
4 files changed +525
-8
lines changed Original file line number Diff line number Diff line change
1
+ < html >
2
+ <!-- View this file with `pnpm dev:browser` -->
3
+
4
+ < head >
5
+ < meta content ="text/html;charset=utf-8 " http-equiv ="Content-Type " />
6
+ < script src ="https://unpkg.com/@babel/standalone/babel.min.js "> </ script >
7
+ < script type ="module ">
8
+ import decoratorTransforms from 'decorator-transforms' ;
9
+
10
+ const output = Babel . transform (
11
+ `
12
+ import { tracked } from '@glimmer/tracking';
13
+
14
+ export class Demo {
15
+ @tracked count = 0;
16
+
17
+ increment = () => this.count++;
18
+ }
19
+ ` ,
20
+ {
21
+ plugins : [
22
+ // This plugin
23
+ [
24
+ decoratorTransforms ,
25
+ {
26
+ runtime : {
27
+ import : 'decorator-transforms/globals' ,
28
+ } ,
29
+ } ,
30
+ ] ,
31
+ ] ,
32
+ } ,
33
+ ) ;
34
+
35
+ document . querySelector ( '#output' ) . innerHTML = output . code ;
36
+ </ script >
37
+ </ head >
38
+
39
+ < body >
40
+ < pre id ="output "> </ pre >
41
+ </ body >
42
+ </ html >
Original file line number Diff line number Diff line change 31
31
],
32
32
"scripts" : {
33
33
"build" : " tsup --dts" ,
34
+ "dev:browser" : " vite" ,
34
35
"lint" : " tsc && prettier --check ." ,
35
36
"lint:fix" : " prettier --write ." ,
36
37
"start" : " tsup --dts --watch" ,
57
58
"qunit" : " ^2.20.0" ,
58
59
"release-plan" : " ^0.9.0" ,
59
60
"tsup" : " ^7.3.0" ,
60
- "typescript" : " ^5.4.5"
61
+ "typescript" : " ^5.4.5" ,
62
+ "vite" : " ^5.4.10"
61
63
},
62
64
"typesVersions" : {
63
65
"*" : {
You can’t perform that action at this time.
0 commit comments