build-font-file-id-generator.ts — astro Source File
Architecture documentation for build-font-file-id-generator.ts, a typescript file in the astro codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 0cef066d_abe9_01ad_3924_894381e69a1b["build-font-file-id-generator.ts"] e92fda44_4a5d_b83b_1a45_958cdae6c91b["./definitions.js"] 0cef066d_abe9_01ad_3924_894381e69a1b --> e92fda44_4a5d_b83b_1a45_958cdae6c91b ea387312_d0a2_bb52_dafc_3872f7307f95["../../src/assets/fonts/types.js"] 0cef066d_abe9_01ad_3924_894381e69a1b --> ea387312_d0a2_bb52_dafc_3872f7307f95 style 0cef066d_abe9_01ad_3924_894381e69a1b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import type { FontFileContentResolver, FontFileIdGenerator, Hasher } from '../definitions.js';
import type { FontType } from '../types.js';
export class BuildFontFileIdGenerator implements FontFileIdGenerator {
readonly #hasher: Hasher;
readonly #contentResolver: FontFileContentResolver;
constructor({
hasher,
contentResolver,
}: {
hasher: Hasher;
contentResolver: FontFileContentResolver;
}) {
this.#hasher = hasher;
this.#contentResolver = contentResolver;
}
generate({ originalUrl, type }: { originalUrl: string; type: FontType }): string {
return `${this.#hasher.hashString(this.#contentResolver.resolve(originalUrl))}.${type}`;
}
}
Domain
Subdomains
Classes
Dependencies
- ../../src/assets/fonts/types.js
- ./definitions.js
Source
Frequently Asked Questions
What does build-font-file-id-generator.ts do?
build-font-file-id-generator.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What does build-font-file-id-generator.ts depend on?
build-font-file-id-generator.ts imports 2 module(s): ../../src/assets/fonts/types.js, ./definitions.js.
Where is build-font-file-id-generator.ts in the architecture?
build-font-file-id-generator.ts is located at packages/astro/src/assets/fonts/infra/build-font-file-id-generator.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/assets/fonts/infra).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free