Skip to content

Commit 2d75cbb

Browse files
fix: update dependencies
1 parent f415a11 commit 2d75cbb

File tree

12 files changed

+2440
-2721
lines changed

12 files changed

+2440
-2721
lines changed

examples/astro/astro.config.mjs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,32 @@ export default defineConfig({
1111
custom: {
1212
display: 'swap',
1313
families: {
14-
'Dancing Script': './public/assets/fonts/DancingScript*',
14+
'Dancing Script': {
15+
src: './public/assets/fonts/DancingScript*',
16+
transform(font) {
17+
if (font.basename === 'DancingScript-Bold')
18+
font.weight = 700
19+
20+
return font
21+
},
22+
},
1523
},
1624
},
25+
26+
fontsource: {
27+
families: [
28+
{
29+
name: 'ABeeZee',
30+
weights: [400],
31+
styles: ['italic'],
32+
},
33+
{
34+
name: 'Truculenta',
35+
weights: [400, 700],
36+
subset: 'latin-ext',
37+
},
38+
],
39+
},
1740
}),
1841
],
1942
})

examples/astro/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"astro": "astro"
1010
},
1111
"devDependencies": {
12-
"astro": "^2.1.3",
12+
"@fontsource/abeezee": "^4.5.10",
13+
"@fontsource/truculenta": "^4.5.12",
14+
"astro": "^2.3.0",
1315
"unplugin-fonts": "workspace:*"
1416
}
1517
}

examples/astro/src/pages/index.astro

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import Unfont from 'unplugin-fonts/astro/component.astro';
99
<body>
1010
<h1>Hello Astro!</h1>
1111
<h2>I'm using a local font !</h2>
12+
<div class="fontsource-abeezee">I'm a ABeeZee fontsource</div>
13+
<div class="fontsource-truculenta">I'm a Truculenta fontsource</div>
1214
<a href="https://vitejs.dev/guide/features.html" target="_blank">Documentation</a>
1315
</body>
1416
</html>
@@ -32,4 +34,12 @@ import Unfont from 'unplugin-fonts/astro/component.astro';
3234
font-size: 3rem;
3335
font-weight: 600;
3436
}
35-
</style>
37+
38+
.fontsource-abeezee {
39+
font-family: "ABeeZee", sans-serif;
40+
}
41+
42+
.fontsource-truculenta {
43+
font-family: "Truculenta", sans-serif;
44+
}
45+
</style>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
import Unfont from 'unplugin-fonts/astro/component.astro';
3+
---
4+
5+
<html>
6+
<head>
7+
<Unfont />
8+
</head>
9+
<body>
10+
<h1>Hello Astro!</h1>
11+
<h2>I'm using a local font in a subfolder !</h2>
12+
<div class="fontsource-abeezee">I'm a ABeeZee fontsource</div>
13+
<div class="fontsource-truculenta">I'm a Truculenta fontsource</div>
14+
<a href="https://vitejs.dev/guide/features.html" target="_blank">Documentation</a>
15+
</body>
16+
</html>
17+
18+
<style>
19+
body {
20+
font-family: "Crimson Pro", Avenir, Helvetica, Arial, sans-serif;
21+
-webkit-font-smoothing: antialiased;
22+
-moz-osx-font-smoothing: grayscale;
23+
text-align: center;
24+
color: #2c3e50;
25+
margin-top: 60px;
26+
}
27+
28+
a {
29+
font-family: "Open Sans", Avenir, Helvetica, Arial, sans-serif;
30+
}
31+
32+
h2 {
33+
font-family: "Dancing Script", sans-serif;
34+
font-size: 3rem;
35+
font-weight: 600;
36+
}
37+
38+
.fontsource-abeezee {
39+
font-family: "ABeeZee", sans-serif;
40+
}
41+
42+
.fontsource-truculenta {
43+
font-family: "Truculenta", sans-serif;
44+
}
45+
</style>

examples/nuxt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"preview": "nuxt preview"
88
},
99
"devDependencies": {
10-
"nuxt": "^3.3.1",
10+
"nuxt": "^3.4.1",
1111
"unplugin-fonts": "workspace:*"
1212
}
1313
}

examples/sveltekit/package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
2-
"name": "sveltekit-test",
3-
"private": true,
4-
"type": "module",
5-
"scripts": {
6-
"dev": "vite dev",
7-
"build": "vite build",
8-
"preview": "vite preview",
9-
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
10-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch"
11-
},
12-
"devDependencies": {
13-
"@fontsource/abeezee": "^4.5.10",
14-
"@fontsource/truculenta": "^4.5.12",
15-
"@neoconfetti/svelte": "^1.0.0",
16-
"@sveltejs/adapter-auto": "^2.0.0",
17-
"@sveltejs/kit": "^1.5.0",
18-
"@types/cookie": "^0.5.1",
19-
"svelte": "^3.54.0",
20-
"svelte-check": "^3.0.1",
21-
"unplugin-fonts": "workspace:*",
22-
"vite": "^4.0.0",
23-
"typescript": "^5.0.2"
24-
}
2+
"name": "sveltekit-test",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"dev": "vite dev",
7+
"build": "vite build",
8+
"preview": "vite preview",
9+
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
10+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch"
11+
},
12+
"devDependencies": {
13+
"@fontsource/abeezee": "^4.5.10",
14+
"@fontsource/truculenta": "^4.5.12",
15+
"@neoconfetti/svelte": "^1.0.0",
16+
"@sveltejs/adapter-auto": "^2.0.0",
17+
"@sveltejs/kit": "^1.15.5",
18+
"@types/cookie": "^0.5.1",
19+
"svelte": "^3.58.0",
20+
"svelte-check": "^3.2.0",
21+
"typescript": "^5.0.4",
22+
"unplugin-fonts": "workspace:*",
23+
"vite": "^4.2.1"
24+
}
2525
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<script>
2+
import { links } from 'unplugin-fonts/head'
23
import 'unfonts.css'
34
</script>
45

6+
<svelte:head>
7+
{#each links as link}
8+
<link {...link?.attrs || {}} />
9+
{/each}
10+
</svelte:head>
11+
512
<main>
613
<slot />
714
</main>

examples/sveltekit/tsconfig.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
"resolveJsonModule": true,
99
"skipLibCheck": true,
1010
"sourceMap": true,
11-
"strict": true
12-
}
13-
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files
14-
//
15-
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
16-
// from the referenced tsconfig.json - TypeScript does not merge them in
11+
"strict": true,
12+
"types": ["unplugin-fonts/client"]
13+
}
1714
}

examples/vite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"@fontsource/abeezee": "^4.5.10",
1111
"@fontsource/truculenta": "^4.5.12",
1212
"unplugin-fonts": "workspace:*",
13-
"vite": "^4.2.0"
13+
"vite": "^4.2.1"
1414
}
1515
}

examples/vitepress/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
},
1010
"devDependencies": {
1111
"unplugin-fonts": "workspace:*",
12-
"vitepress": "^1.0.0-alpha.60"
12+
"vitepress": "1.0.0-alpha.65"
1313
}
1414
}

0 commit comments

Comments
 (0)