result.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = void 0;
  4. var _warning = _interopRequireDefault(require("./warning"));
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6. 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); } }
  7. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  8. /**
  9. * Provides the result of the PostCSS transformations.
  10. *
  11. * A Result instance is returned by {@link LazyResult#then}
  12. * or {@link Root#toResult} methods.
  13. *
  14. * @example
  15. * postcss([autoprefixer]).process(css).then(result => {
  16. * console.log(result.css)
  17. * })
  18. *
  19. * @example
  20. * const result2 = postcss.parse(css).toResult()
  21. */
  22. var Result = /*#__PURE__*/function () {
  23. /**
  24. * @param {Processor} processor Processor used for this transformation.
  25. * @param {Root} root Root node after all transformations.
  26. * @param {processOptions} opts Options from the {@link Processor#process}
  27. * or {@link Root#toResult}.
  28. */
  29. function Result(processor, root, opts) {
  30. /**
  31. * The Processor instance used for this transformation.
  32. *
  33. * @type {Processor}
  34. *
  35. * @example
  36. * for (const plugin of result.processor.plugins) {
  37. * if (plugin.postcssPlugin === 'postcss-bad') {
  38. * throw 'postcss-good is incompatible with postcss-bad'
  39. * }
  40. * })
  41. */
  42. this.processor = processor;
  43. /**
  44. * Contains messages from plugins (e.g., warnings or custom messages).
  45. * Each message should have type and plugin properties.
  46. *
  47. * @type {Message[]}
  48. *
  49. * @example
  50. * postcss.plugin('postcss-min-browser', () => {
  51. * return (root, result) => {
  52. * const browsers = detectMinBrowsersByCanIUse(root)
  53. * result.messages.push({
  54. * type: 'min-browser',
  55. * plugin: 'postcss-min-browser',
  56. * browsers
  57. * })
  58. * }
  59. * })
  60. */
  61. this.messages = [];
  62. /**
  63. * Root node after all transformations.
  64. *
  65. * @type {Root}
  66. *
  67. * @example
  68. * root.toResult().root === root
  69. */
  70. this.root = root;
  71. /**
  72. * Options from the {@link Processor#process} or {@link Root#toResult} call
  73. * that produced this Result instance.
  74. *
  75. * @type {processOptions}
  76. *
  77. * @example
  78. * root.toResult(opts).opts === opts
  79. */
  80. this.opts = opts;
  81. /**
  82. * A CSS string representing of {@link Result#root}.
  83. *
  84. * @type {string}
  85. *
  86. * @example
  87. * postcss.parse('a{}').toResult().css //=> "a{}"
  88. */
  89. this.css = undefined;
  90. /**
  91. * An instance of `SourceMapGenerator` class from the `source-map` library,
  92. * representing changes to the {@link Result#root} instance.
  93. *
  94. * @type {SourceMapGenerator}
  95. *
  96. * @example
  97. * result.map.toJSON() //=> { version: 3, file: 'a.css', … }
  98. *
  99. * @example
  100. * if (result.map) {
  101. * fs.writeFileSync(result.opts.to + '.map', result.map.toString())
  102. * }
  103. */
  104. this.map = undefined;
  105. }
  106. /**
  107. * Returns for @{link Result#css} content.
  108. *
  109. * @example
  110. * result + '' === result.css
  111. *
  112. * @return {string} String representing of {@link Result#root}.
  113. */
  114. var _proto = Result.prototype;
  115. _proto.toString = function toString() {
  116. return this.css;
  117. }
  118. /**
  119. * Creates an instance of {@link Warning} and adds it
  120. * to {@link Result#messages}.
  121. *
  122. * @param {string} text Warning message.
  123. * @param {Object} [opts] Warning options.
  124. * @param {Node} opts.node CSS node that caused the warning.
  125. * @param {string} opts.word Word in CSS source that caused the warning.
  126. * @param {number} opts.index Index in CSS node string that caused
  127. * the warning.
  128. * @param {string} opts.plugin Name of the plugin that created
  129. * this warning. {@link Result#warn} fills
  130. * this property automatically.
  131. *
  132. * @return {Warning} Created warning.
  133. */
  134. ;
  135. _proto.warn = function warn(text, opts) {
  136. if (opts === void 0) {
  137. opts = {};
  138. }
  139. if (!opts.plugin) {
  140. if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
  141. opts.plugin = this.lastPlugin.postcssPlugin;
  142. }
  143. }
  144. var warning = new _warning.default(text, opts);
  145. this.messages.push(warning);
  146. return warning;
  147. }
  148. /**
  149. * Returns warnings from plugins. Filters {@link Warning} instances
  150. * from {@link Result#messages}.
  151. *
  152. * @example
  153. * result.warnings().forEach(warn => {
  154. * console.warn(warn.toString())
  155. * })
  156. *
  157. * @return {Warning[]} Warnings from plugins.
  158. */
  159. ;
  160. _proto.warnings = function warnings() {
  161. return this.messages.filter(function (i) {
  162. return i.type === 'warning';
  163. });
  164. }
  165. /**
  166. * An alias for the {@link Result#css} property.
  167. * Use it with syntaxes that generate non-CSS output.
  168. *
  169. * @type {string}
  170. *
  171. * @example
  172. * result.css === result.content
  173. */
  174. ;
  175. _createClass(Result, [{
  176. key: "content",
  177. get: function get() {
  178. return this.css;
  179. }
  180. }]);
  181. return Result;
  182. }();
  183. var _default = Result;
  184. /**
  185. * @typedef {object} Message
  186. * @property {string} type Message type.
  187. * @property {string} plugin Source PostCSS plugin name.
  188. */
  189. exports.default = _default;
  190. module.exports = exports.default;
  191. //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlc3VsdC5lczYiXSwibmFtZXMiOlsiUmVzdWx0IiwicHJvY2Vzc29yIiwicm9vdCIsIm9wdHMiLCJtZXNzYWdlcyIsImNzcyIsInVuZGVmaW5lZCIsIm1hcCIsInRvU3RyaW5nIiwid2FybiIsInRleHQiLCJwbHVnaW4iLCJsYXN0UGx1Z2luIiwicG9zdGNzc1BsdWdpbiIsIndhcm5pbmciLCJXYXJuaW5nIiwicHVzaCIsIndhcm5pbmdzIiwiZmlsd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