()
| 302 | } |
| 303 | |
| 304 | setSourcesContent() { |
| 305 | let already = {} |
| 306 | if (this.root) { |
| 307 | this.root.walk(node => { |
| 308 | if (node.source) { |
| 309 | let from = node.source.input.from |
| 310 | if (from && !already[from]) { |
| 311 | already[from] = true |
| 312 | let fromUrl = this.usesFileUrls |
| 313 | ? this.toFileUrl(from) |
| 314 | : this.toUrl(this.path(from)) |
| 315 | this.map.setSourceContent(fromUrl, node.source.input.css) |
| 316 | } |
| 317 | } |
| 318 | }) |
| 319 | } else if (this.css) { |
| 320 | let from = this.opts.from |
| 321 | ? this.toUrl(this.path(this.opts.from)) |
| 322 | : '<no source>' |
| 323 | this.map.setSourceContent(from, this.css) |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | sourcePath(node) { |
| 328 | if (this.mapOpts.from) { |
no test coverage detected