MCPcopy Index your code
hub / github.com/postcss/postcss / applyPrevMaps

Method applyPrevMaps

lib/map-generator.js:46–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 }
45
46 applyPrevMaps() {
47 for (let prev of this.previous()) {
48 let from = this.toUrl(this.path(prev.file))
49 let root = prev.root || dirname(prev.file)
50 let map
51
52 if (this.mapOpts.sourcesContent === false) {
53 map = new SourceMapConsumer(prev.text)
54 if (map.sourcesContent) {
55 map.sourcesContent = null
56 }
57 } else {
58 map = prev.consumer()
59 }
60
61 this.map.applySourceMap(map, from, this.toUrl(this.path(root)))
62 }
63 }
64
65 clearAnnotation() {
66 if (this.mapOpts.annotation === false) return

Callers 1

generateMapMethod · 0.95

Calls 4

previousMethod · 0.95
toUrlMethod · 0.95
pathMethod · 0.95
consumerMethod · 0.80

Tested by

no test coverage detected