Home / Function/ toRawSourceMap() — tailwindcss Function Reference

toRawSourceMap() — tailwindcss Function Reference

Architecture documentation for the toRawSourceMap() function in source-map.test.ts from the tailwindcss codebase.

Function typescript OxideCore Scanner calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  01a761ec_5925_9962_61cf_9dae24f3be07["toRawSourceMap()"]
  dc201492_c44d_eb89_f00f_16255f344c27["run()"]
  dc201492_c44d_eb89_f00f_16255f344c27 -->|calls| 01a761ec_5925_9962_61cf_9dae24f3be07
  0aa64a1c_efd8_a69d_48ed_649b7a86c854["get()"]
  01a761ec_5925_9962_61cf_9dae24f3be07 -->|calls| 0aa64a1c_efd8_a69d_48ed_649b7a86c854
  style 01a761ec_5925_9962_61cf_9dae24f3be07 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/source-maps/source-map.test.ts lines 50–81

function toRawSourceMap(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 ?? undefined,
    })

    generator.setSourceContent(original.url, original.content)
  }

  return generator.toString()
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does toRawSourceMap() do?
toRawSourceMap() is a function in the tailwindcss codebase.
What does toRawSourceMap() call?
toRawSourceMap() calls 1 function(s): get.
What calls toRawSourceMap()?
toRawSourceMap() is called by 1 function(s): run.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free