serializeSourceMap() — tailwindcss Function Reference
Architecture documentation for the serializeSourceMap() function in source-maps.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 56d3a31c_766c_2efe_bb76_f83a24b56549["serializeSourceMap()"] 6219568c_788d_e9f4_1518_104d7994cc7f["source-maps.ts"] 56d3a31c_766c_2efe_bb76_f83a24b56549 -->|defined in| 6219568c_788d_e9f4_1518_104d7994cc7f ce779092_6c9e_8967_9d8c_36d0185e635f["toSourceMap()"] ce779092_6c9e_8967_9d8c_36d0185e635f -->|calls| 56d3a31c_766c_2efe_bb76_f83a24b56549 2820372c_b982_9e06_fc23_f8f4ac308d00["get()"] 56d3a31c_766c_2efe_bb76_f83a24b56549 -->|calls| 2820372c_b982_9e06_fc23_f8f4ac308d00 style 56d3a31c_766c_2efe_bb76_f83a24b56549 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-node/src/source-maps.ts lines 12–43
function serializeSourceMap(map: DecodedSourceMap): string {
let generator = new SourceMapGenerator()
let id = 1
let sourceTable = new DefaultMap<
DecodedSource | null,
{
url: string
content: string
}
>((src) => {
return {
url: src?.url ?? `<unknown ${id++}>`,
content: src?.content ?? '<none>',
}
})
for (let mapping of map.mappings) {
let original = sourceTable.get(mapping.originalPosition?.source ?? null)
generator.addMapping({
generated: mapping.generatedPosition,
original: mapping.originalPosition,
source: original.url,
name: mapping.name,
})
generator.setSourceContent(original.url, original.content)
}
return generator.toString()
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does serializeSourceMap() do?
serializeSourceMap() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-node/src/source-maps.ts.
Where is serializeSourceMap() defined?
serializeSourceMap() is defined in packages/@tailwindcss-node/src/source-maps.ts at line 12.
What does serializeSourceMap() call?
serializeSourceMap() calls 1 function(s): get.
What calls serializeSourceMap()?
serializeSourceMap() is called by 1 function(s): toSourceMap.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free