MCPcopy
hub / github.com/postcss/postcss / constructor

Method constructor

lib/previous-map.js:17–30  ·  view source on GitHub ↗
(css, opts)

Source from the content-addressed store, hash-verified

15
16class PreviousMap {
17 constructor(css, opts) {
18 if (opts.map === false) return
19 if (opts.unsafeMap) this.unsafeMap = true
20 this.loadAnnotation(css)
21 this.inline = this.startWith(this.annotation, 'data:')
22
23 let prev = opts.map ? opts.map.prev : undefined
24 let text = this.loadMap(opts.from, prev)
25 if (!this.mapFile && opts.from) {
26 this.mapFile = opts.from
27 }
28 if (this.mapFile) this.root = dirname(this.mapFile)
29 if (text) this.text = text
30 }
31
32 consumer() {
33 if (!this.consumerCache) {

Callers

nothing calls this directly

Calls 3

loadAnnotationMethod · 0.95
startWithMethod · 0.95
loadMapMethod · 0.95

Tested by

no test coverage detected