MCPcopy
hub / github.com/tailwindlabs/tailwindcss / toSourceMap

Function toSourceMap

packages/@tailwindcss-node/src/source-maps.ts:45–60  ·  view source on GitHub ↗
(map: DecodedSourceMap | string)

Source from the content-addressed store, hash-verified

43}
44
45export function toSourceMap(map: DecodedSourceMap | string): SourceMap {
46 let raw = typeof map === 'string' ? map : serializeSourceMap(map)
47
48 function comment(url: string) {
49 return `/*# sourceMappingURL\x3d${url} */\n`
50 }
51
52 return {
53 raw,
54 get inline() {
55 let inlined = Buffer.from(raw, 'utf-8').toString('base64')
56 return comment(`data:application/json;base64,${inlined}`)
57 },
58 comment,
59 }
60}

Callers 2

generateMethod · 0.90

Calls 1

serializeSourceMapFunction · 0.85

Tested by

no test coverage detected