Files
med-notes/.pnpm-store/v10/files/1e/a40b170012e2ba504ba718c2a148a146440193a985927909ad746935f558b8a3ef44394abb10dfa24d6ce650a3339ed8081cd60908e1e2cbf41ee3e2c79b16
2025-05-09 05:30:08 +02:00

43 lines
745 B
Plaintext

'use strict'
let Warning = require('./warning')
class Result {
get content() {
return this.css
}
constructor(processor, root, opts) {
this.processor = processor
this.messages = []
this.root = root
this.opts = opts
this.css = undefined
this.map = undefined
}
toString() {
return this.css
}
warn(text, opts = {}) {
if (!opts.plugin) {
if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
opts.plugin = this.lastPlugin.postcssPlugin
}
}
let warning = new Warning(text, opts)
this.messages.push(warning)
return warning
}
warnings() {
return this.messages.filter(i => i.type === 'warning')
}
}
module.exports = Result
Result.default = Result