Skip to content

Commit 78ed8b5

Browse files
refactor(fonts): match cli structure (#14806)
1 parent 1a2ed01 commit 78ed8b5

32 files changed

+60
-60
lines changed

packages/astro/src/assets/fonts/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Here is an overview of the architecture of the fonts in Astro:
99
- For each family, it resolves fonts data and normalizes them
1010
- For each family, optimized fallbacks (and related CSS) are generated if applicable
1111
- It returns the data
12-
- [`/logic`](./logic/) contains the sub steps of `orchestrate()` so they can be easily tested
12+
- [`/core`](./core/) contains the sub steps of `orchestrate()` so they can be easily tested
1313
- The logic uses [inversion of control](https://en.wikipedia.org/wiki/Inversion_of_control) to make it easily testable and swappable
1414
- [`definitions.ts`](./definitions.ts) defines dependencies
15-
- Those dependencies are implemented in [`/implementations`](./implementations/)
15+
- Those dependencies are implemented in [`/infra`](./infra/)
1616
- [`fontsPlugin()`](./vite-plugin-fonts.ts) calls `orchestrate()` and using its result, setups anything required so that fonts can
1717
- Be exposed to users (virtual module)
1818
- Be used in dev (middleware)

packages/astro/src/assets/fonts/definitions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type * as unifont from 'unifont';
2-
import type { CollectedFontForMetrics } from './logic/optimize-fallbacks.js';
2+
import type { CollectedFontForMetrics } from './core/optimize-fallbacks.js';
33
/* eslint-disable @typescript-eslint/no-empty-object-type */
44
import type {
55
AstroFontProvider,

0 commit comments

Comments
 (0)