normalizeConfigPath() — astro Function Reference
Architecture documentation for the normalizeConfigPath() function in types-generator.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD a0e8b4bf_c039_6fa9_623e_e4f1a5bb6bb8["normalizeConfigPath()"] eca81928_a18b_c02e_8e5a_0440befa1a98["types-generator.ts"] a0e8b4bf_c039_6fa9_623e_e4f1a5bb6bb8 -->|defined in| eca81928_a18b_c02e_8e5a_0440befa1a98 453daca9_4232_0b6c_8607_0e08e829d051["writeContentFiles()"] 453daca9_4232_0b6c_8607_0e08e829d051 -->|calls| a0e8b4bf_c039_6fa9_623e_e4f1a5bb6bb8 style a0e8b4bf_c039_6fa9_623e_e4f1a5bb6bb8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/content/types-generator.ts lines 357–363
function normalizeConfigPath(from: string, to: string) {
const configPath = path.relative(from, to).replace(/\.ts$/, '.js');
// on windows `path.relative` will use backslashes, these must be replaced with forward slashes
const normalizedPath = configPath.replaceAll('\\', '/');
return `"${isRelativePath(configPath) ? '' : './'}${normalizedPath}"` as const;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does normalizeConfigPath() do?
normalizeConfigPath() is a function in the astro codebase, defined in packages/astro/src/content/types-generator.ts.
Where is normalizeConfigPath() defined?
normalizeConfigPath() is defined in packages/astro/src/content/types-generator.ts at line 357.
What calls normalizeConfigPath()?
normalizeConfigPath() is called by 1 function(s): writeContentFiles.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free