X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Funcss%2Fnode_modules%2Fpostcss%2Flib%2Fresult.js;fp=node_modules%2Funcss%2Fnode_modules%2Fpostcss%2Flib%2Fresult.js;h=e6a3a05177a2d8f17ca99a233c95830e33af30a5;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/uncss/node_modules/postcss/lib/result.js b/node_modules/uncss/node_modules/postcss/lib/result.js new file mode 100644 index 000000000..e6a3a0517 --- /dev/null +++ b/node_modules/uncss/node_modules/postcss/lib/result.js @@ -0,0 +1,60 @@ +'use strict'; + +exports.__esModule = true; + +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; }; }(); + +var _warning = require('./warning'); + +var _warning2 = _interopRequireDefault(_warning); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var Result = function () { + function Result(processor, root, opts) { + _classCallCheck(this, Result); + + this.processor = processor; + this.messages = []; + this.root = root; + this.opts = opts; + this.css = undefined; + this.map = undefined; + } + + Result.prototype.toString = function toString() { + return this.css; + }; + + Result.prototype.warn = function warn(text) { + var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + if (!opts.plugin) { + if (this.lastPlugin && this.lastPlugin.postcssPlugin) { + opts.plugin = this.lastPlugin.postcssPlugin; + } + } + + this.messages.push(new _warning2.default(text, opts)); + }; + + Result.prototype.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; +}(); + +exports.default = Result; +module.exports = exports['default']; \ No newline at end of file