Skip to content

Commit

Permalink
fix: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
stafyniaksacha committed Apr 14, 2023
1 parent f415a11 commit 2d75cbb
Show file tree
Hide file tree
Showing 12 changed files with 2,440 additions and 2,721 deletions.
25 changes: 24 additions & 1 deletion examples/astro/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,32 @@ export default defineConfig({
custom: {
display: 'swap',
families: {
'Dancing Script': './public/assets/fonts/DancingScript*',
'Dancing Script': {
src: './public/assets/fonts/DancingScript*',
transform(font) {
if (font.basename === 'DancingScript-Bold')
font.weight = 700

return font
},
},
},
},

fontsource: {
families: [
{
name: 'ABeeZee',
weights: [400],
styles: ['italic'],
},
{
name: 'Truculenta',
weights: [400, 700],
subset: 'latin-ext',
},
],
},
}),
],
})
4 changes: 3 additions & 1 deletion examples/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"astro": "astro"
},
"devDependencies": {
"astro": "^2.1.3",
"@fontsource/abeezee": "^4.5.10",
"@fontsource/truculenta": "^4.5.12",
"astro": "^2.3.0",
"unplugin-fonts": "workspace:*"
}
}
12 changes: 11 additions & 1 deletion examples/astro/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Unfont from 'unplugin-fonts/astro/component.astro';
<body>
<h1>Hello Astro!</h1>
<h2>I'm using a local font !</h2>
<div class="fontsource-abeezee">I'm a ABeeZee fontsource</div>
<div class="fontsource-truculenta">I'm a Truculenta fontsource</div>
<a href="https://vitejs.dev/guide/features.html" target="_blank">Documentation</a>
</body>
</html>
Expand All @@ -32,4 +34,12 @@ import Unfont from 'unplugin-fonts/astro/component.astro';
font-size: 3rem;
font-weight: 600;
}
</style>

.fontsource-abeezee {
font-family: "ABeeZee", sans-serif;
}

.fontsource-truculenta {
font-family: "Truculenta", sans-serif;
}
</style>
45 changes: 45 additions & 0 deletions examples/astro/src/pages/subfolder/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
import Unfont from 'unplugin-fonts/astro/component.astro';
---

<html>
<head>
<Unfont />
</head>
<body>
<h1>Hello Astro!</h1>
<h2>I'm using a local font in a subfolder !</h2>
<div class="fontsource-abeezee">I'm a ABeeZee fontsource</div>
<div class="fontsource-truculenta">I'm a Truculenta fontsource</div>
<a href="https://vitejs.dev/guide/features.html" target="_blank">Documentation</a>
</body>
</html>

<style>
body {
font-family: "Crimson Pro", Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}

a {
font-family: "Open Sans", Avenir, Helvetica, Arial, sans-serif;
}

h2 {
font-family: "Dancing Script", sans-serif;
font-size: 3rem;
font-weight: 600;
}

.fontsource-abeezee {
font-family: "ABeeZee", sans-serif;
}

.fontsource-truculenta {
font-family: "Truculenta", sans-serif;
}
</style>
2 changes: 1 addition & 1 deletion examples/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"preview": "nuxt preview"
},
"devDependencies": {
"nuxt": "^3.3.1",
"nuxt": "^3.4.1",
"unplugin-fonts": "workspace:*"
}
}
46 changes: 23 additions & 23 deletions examples/sveltekit/package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"name": "sveltekit-test",
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch"
},
"devDependencies": {
"@fontsource/abeezee": "^4.5.10",
"@fontsource/truculenta": "^4.5.12",
"@neoconfetti/svelte": "^1.0.0",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.5.0",
"@types/cookie": "^0.5.1",
"svelte": "^3.54.0",
"svelte-check": "^3.0.1",
"unplugin-fonts": "workspace:*",
"vite": "^4.0.0",
"typescript": "^5.0.2"
}
"name": "sveltekit-test",
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch"
},
"devDependencies": {
"@fontsource/abeezee": "^4.5.10",
"@fontsource/truculenta": "^4.5.12",
"@neoconfetti/svelte": "^1.0.0",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.15.5",
"@types/cookie": "^0.5.1",
"svelte": "^3.58.0",
"svelte-check": "^3.2.0",
"typescript": "^5.0.4",
"unplugin-fonts": "workspace:*",
"vite": "^4.2.1"
}
}
7 changes: 7 additions & 0 deletions examples/sveltekit/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<script>
import { links } from 'unplugin-fonts/head'
import 'unfonts.css'
</script>

<svelte:head>
{#each links as link}
<link {...link?.attrs || {}} />
{/each}
</svelte:head>

<main>
<slot />
</main>
9 changes: 3 additions & 6 deletions examples/sveltekit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
"strict": true,
"types": ["unplugin-fonts/client"]
}
}
2 changes: 1 addition & 1 deletion examples/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"@fontsource/abeezee": "^4.5.10",
"@fontsource/truculenta": "^4.5.12",
"unplugin-fonts": "workspace:*",
"vite": "^4.2.0"
"vite": "^4.2.1"
}
}
2 changes: 1 addition & 1 deletion examples/vitepress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
},
"devDependencies": {
"unplugin-fonts": "workspace:*",
"vitepress": "^1.0.0-alpha.60"
"vitepress": "1.0.0-alpha.65"
}
}
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,23 @@
"unplugin": "^1.3.1"
},
"devDependencies": {
"@antfu/eslint-config-ts": "^0.36.0",
"@nuxt/kit": "^3.3.1",
"@types/node": "^18.15.3",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@antfu/eslint-config-ts": "^0.38.4",
"@nuxt/kit": "^3.4.1",
"@types/node": "^18.15.11",
"@typescript-eslint/eslint-plugin": "^5.58.0",
"chalk": "^5.2.0",
"defu": "^6.1.2",
"eslint": "^8.36.0",
"eslint": "^8.38.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"esno": "^0.16.3",
"magic-string": "^0.30.0",
"pathe": "^1.1.0",
"rollup": "^3.19.1",
"rollup": "^3.20.2",
"standard-version": "^9.5.0",
"tsup": "^6.6.3",
"typescript": "^5.0.2",
"vite": "^4.2.0",
"vitest": "^0.29.3",
"webpack": "^5.76.2"
"tsup": "^6.7.0",
"typescript": "^5.0.4",
"vite": "^4.2.1",
"vitest": "^0.30.1",
"webpack": "^5.79.0"
}
}
Loading

0 comments on commit 2d75cbb

Please sign in to comment.