SourceMapper

1.0.0

Create and edit Source Maps in Swift
johnfairh/SourceMapper

What's New

1.0.0

2021-04-24T09:52:10Z

First release

Platforms codecov Tests

SourceMapper

Simple Swift implementation of the SourceMap specification: create, load, query, modify, and save source maps.

Examples

let map = try SourceMap(data: try Data(contentsOf: mapURL))
let segment = map.map(line: 12, column: 0)
let map = SourceMap()
map.sources = [.remote("a.scss")]
map.sourceRoot = "./../src/"
map.setSegments(...)
let mapData = try map.encode()

Documentation

No support for:

  • Extension fields
  • Index map format

Requirements

  • Swift 5.3
  • macOS 10.10 (tested on macOS 11.0 IA64)
  • Linux (tested on Ubuntu 18.04.5)

Installation

Only with Swift Package Manager, via Xcode or directly:

Package dependency:

.package(name: "SourceMapper",
         url: "https://github.com/johnfairh/SourceMapper.git",
         from: "1.0.0")

Contributions

Welcome: open an issue / johnfairh@gmail.com / @johnfairh

License

Distributed under the MIT license.

Description

  • Swift Tools 5.3.0

Dependencies

  • None
Last updated: Thu May 13 2021 07:27:06 GMT-0500 (GMT-05:00)