123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- "use strict";
- exports.__esModule = true;
- exports.default = void 0;
- var _warning = _interopRequireDefault(require("./warning"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
- var Result = function () {
-
- function Result(processor, root, opts) {
-
- this.processor = processor;
-
- this.messages = [];
-
- this.root = root;
-
- this.opts = opts;
-
- this.css = undefined;
-
- this.map = undefined;
- }
-
- var _proto = Result.prototype;
- _proto.toString = function toString() {
- return this.css;
- }
-
- ;
- _proto.warn = function warn(text, opts) {
- if (opts === void 0) {
- opts = {};
- }
- if (!opts.plugin) {
- if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
- opts.plugin = this.lastPlugin.postcssPlugin;
- }
- }
- var warning = new _warning.default(text, opts);
- this.messages.push(warning);
- return warning;
- }
-
- ;
- _proto.warnings = function warnings() {
- return this.messages.filter(function (i) {
- return i.type === 'warning';
- });
- }
-
- ;
- _createClass(Result, [{
- key: "content",
- get: function get() {
- return this.css;
- }
- }]);
- return Result;
- }();
- var _default = Result;
- exports.default = _default;
- module.exports = exports.default;
|