Skip to content

Commit 5ae235a

Browse files
feat!: migrate plugin to unplugin
BREAKING CHANGE: - rename virtual "virtual:fonts.css" to "unfonts.css" - rename package "vite-plugin-fonts" to "unplugin-fonts"
1 parent 9714960 commit 5ae235a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+8395
-1865
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
*.snap

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ignore-workspace-root-check=true
2+
shamefully-hoist=true

example/main.ts

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

examples/astro/astro.config.mjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { defineConfig } from 'astro/config'
2+
import Unfonts from 'unplugin-fonts/astro'
3+
4+
export default defineConfig({
5+
integrations: [
6+
Unfonts({
7+
google: {
8+
families: ['Crimson Pro', 'Open Sans', 'Material+Icons'],
9+
},
10+
11+
custom: {
12+
display: 'swap',
13+
families: {
14+
'Dancing Script': './public/assets/fonts/DancingScript*',
15+
},
16+
},
17+
})
18+
],
19+
})

examples/astro/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "astro-test",
3+
"private": true,
4+
"scripts": {
5+
"dev": "astro dev",
6+
"start": "astro dev",
7+
"build": "astro build",
8+
"preview": "astro preview",
9+
"astro": "astro"
10+
},
11+
"devDependencies": {
12+
"astro": "^2.1.3",
13+
"unplugin-fonts": "workspace:*"
14+
}
15+
}

examples/astro/src/env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="astro/client" />

0 commit comments

Comments
 (0)