Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into qwerzl/main
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 9, 2024
2 parents d9b2780 + 8aba135 commit 0e35cda
Show file tree
Hide file tree
Showing 14 changed files with 875 additions and 227 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dist
.build-*
.env
.netlify
.wrangler

# Env
.env
Expand Down
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
# Changelog


## v0.0.2

[compare changes](https://github.com/nuxt/fonts/compare/v0.0.1...v0.0.2)

### 🚀 Enhancements

- Minify injected css when building ([e906ada](https://github.com/nuxt/fonts/commit/e906ada))
- **deps:** Update `fontaine` to use new capsize metrics ([1800995](https://github.com/nuxt/fonts/commit/1800995))

### 🔥 Performance

- Store font data in `node_modules/.cache` ([ed3e9e5](https://github.com/nuxt/fonts/commit/ed3e9e5))
- Update to use `.cache/nuxt/fonts` prefix for all caches ([7b91b0d](https://github.com/nuxt/fonts/commit/7b91b0d))

### 🩹 Fixes

- **google:** Sort resolved variants when fetching font css ([#33](https://github.com/nuxt/fonts/pull/33))
- Don't add font storage to runtime 🙈 ([c06dd6d](https://github.com/nuxt/fonts/commit/c06dd6d))

### 📖 Documentation

- Remove nightly instructions ([760558b](https://github.com/nuxt/fonts/commit/760558b))

### 🏡 Chore

- Remove links to nuxt/image ([cb30d06](https://github.com/nuxt/fonts/commit/cb30d06))
- Add missing dev deps ([d03ffed](https://github.com/nuxt/fonts/commit/d03ffed))
- Skip type checking `scripts/` ([b5e7231](https://github.com/nuxt/fonts/commit/b5e7231))

### 🤖 CI

- Enable nightly release with provenance ([fcc1e87](https://github.com/nuxt/fonts/commit/fcc1e87))
- Remove `contents: read` permission as repo is now public ([ed4a2a9](https://github.com/nuxt/fonts/commit/ed4a2a9))
- Add changelogensets ([792de60](https://github.com/nuxt/fonts/commit/792de60))

### ❤️ Contributors

- Daniel Roe ([@danielroe](http://github.com/danielroe))
- Qwerzl ([@qwerzl](http://github.com/qwerzl))

## v0.0.1


Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export default defineNuxtConfig({
// Or you can disable a built-in provider
google: false,
},
// You can customize the order in which providers are checked.
priority: ['bunny', 'google'],
// You can also set a single provider, which is a shortcut for disabling all but one provider
provider: 'fontshare',
}
})
```
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nuxt/fonts",
"version": "0.0.1",
"version": "0.0.2",
"description": "Automatic font configuration for Nuxt apps",
"repository": {
"type": "git",
Expand Down Expand Up @@ -43,16 +43,17 @@
"css-tree": "^2.3.1",
"defu": "^6.1.4",
"esbuild": "^0.20.1",
"fontaine": "^0.4.1",
"fontaine": "^0.5.0",
"globby": "^14.0.1",
"h3": "^1.11.1",
"jiti": "^1.21.0",
"magic-regexp": "^0.8.0",
"magic-string": "^0.30.8",
"ofetch": "^1.3.3",
"ohash": "^1.1.3",
"pathe": "^1.1.2",
"ufo": "^1.4.0",
"unplugin": "^1.8.2",
"unplugin": "^1.9.0",
"unstorage": "^1.10.1"
},
"devDependencies": {
Expand All @@ -67,14 +68,14 @@
"consola": "^3.2.3",
"eslint": "^8.57.0",
"execa": "^8.0.1",
"nitropack": "^2.9.1",
"nitropack": "^2.9.2",
"nuxt": "^3.10.3",
"playwright-core": "^1.42.1",
"semver": "^7.6.0",
"typescript": "^5.3.3",
"typescript": "^5.4.2",
"unbuild": "^2.0.0",
"vitest": "^1.3.1",
"vue-tsc": "^2.0.5"
"vue-tsc": "^2.0.6"
},
"resolutions": {
"@nuxt/fonts": "workspace:*"
Expand Down
5 changes: 2 additions & 3 deletions playground/providers/custom.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// TODO: expose types publicly
import type { FontProvider } from '../../src/types'
import type { FontProvider } from '@nuxt/fonts'

const resolvableFonts = new Set<string>()
export default {
async setup () {
// Do some stuff
resolvableFonts.add('SomeFontFromCustomProvider')
},
async resolveFontFaces (fontFamily, _defaults) {
async resolveFontFaces (fontFamily) {
if (!resolvableFonts.has(fontFamily)) { return }
return {
fonts: {
Expand Down
Loading

0 comments on commit 0e35cda

Please sign in to comment.