Skip to content

Commit 0acd4f3

Browse files
committed
chore: refactor browser example
1 parent a0eecf9 commit 0acd4f3

File tree

10 files changed

+8
-167
lines changed

10 files changed

+8
-167
lines changed

bun.lockb

-1.94 KB
Binary file not shown.

playground/browser/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/intlify.svg" />
65
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
76
<title>Browser example</title>
87
</head>
98
<body>
109
<div id="app"></div>
11-
<script type="module" src="/src/main.ts"></script>
10+
<script type="module" src="./index.js"></script>
1211
</body>
1312
</html>

playground/browser/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { isLocale } from 'https://esm.sh/@intlify/utils'
2+
3+
document.querySelector('#app').innerHTML = `
4+
<p>isLocale('en-US'): ${isLocale(new Intl.Locale('en-US'))}</p>
5+
`

playground/browser/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
8-
"build": "tsc && vite build",
9-
"preview": "vite preview"
7+
"dev": "npx --no-install serve -l 3000"
108
},
119
"devDependencies": {
12-
"typescript": "^5.0.2",
13-
"vite": "^4.4.5"
10+
"serve": "^14.2.1"
1411
}
1512
}

playground/browser/public/intlify.svg

Lines changed: 0 additions & 7 deletions
This file was deleted.

playground/browser/src/counter.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

playground/browser/src/main.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

playground/browser/src/style.css

Lines changed: 0 additions & 97 deletions
This file was deleted.

playground/browser/src/vite-env.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

playground/browser/tsconfig.json

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)