Janiczek / elm-sourcemap

A builder for Source Maps (revision 3)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elm-sourcemap

A builder for Source Maps (revision 3).

Source Map is a collection of mappings from a generated (often minified) file to the original source code (across multiple files if needed).

Usage

import SourceMap

SourceMap.empty
  |> SourceMap.withFile "elm.min.js"
  |> SourceMap.addMapping
      { generatedLine = 3
      , generatedColumn = 10
      , source = "Main.elm"
      , originalLine = 10
      , originalColumn = 1
      , name = Just "init"
      }
  |> SourceMap.toString

{-->

{
  "version": 3,
  "sources": [
    "Main.elm"
  ],
  "names": [
    "init"
  ],
  "mappings": ";;SASAA",
  "file": "elm.min.js"
}

-}

About

A builder for Source Maps (revision 3)

License:Apache License 2.0


Languages

Language:Elm 100.0%