3 exports.__esModule = true;
5 var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
7 var _warning = require('./warning');
9 var _warning2 = _interopRequireDefault(_warning);
11 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
15 var Result = function () {
16 function Result(processor, root, opts) {
17 _classCallCheck(this, Result);
19 this.processor = processor;
27 Result.prototype.toString = function toString() {
31 Result.prototype.warn = function warn(text) {
32 var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
35 if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
36 opts.plugin = this.lastPlugin.postcssPlugin;
40 this.messages.push(new _warning2.default(text, opts));
43 Result.prototype.warnings = function warnings() {
44 return this.messages.filter(function (i) {
45 return i.type === 'warning';
49 _createClass(Result, [{
59 exports.default = Result;
60 module.exports = exports['default'];