1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.resetWarning = undefined;
|
7 |
|
8 | var _postcss = require("postcss");
|
9 |
|
10 | var _postcss2 = _interopRequireDefault(_postcss);
|
11 |
|
12 | var _chalk = require("chalk");
|
13 |
|
14 | var _chalk2 = _interopRequireDefault(_chalk);
|
15 |
|
16 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17 |
|
18 | var shouldGlobalWarn = true;
|
19 | var resetWarning = exports.resetWarning = function resetWarning() {
|
20 | return shouldGlobalWarn = true;
|
21 | };
|
22 |
|
23 | var warnForDeprecations = _postcss2.default.plugin("postcss-cssnext-warn-for-deprecations", function (_ref) {
|
24 | var messenger = _ref.console;
|
25 |
|
26 | return function (style) {
|
27 |
|
28 | style.walkAtRules("apply", function () {
|
29 | if (shouldGlobalWarn) {
|
30 | shouldGlobalWarn = false;
|
31 | messenger.log(_chalk2.default.yellow.bold("You are using @apply rule and custom property sets. \n" + "This feature won't be included in next the major release " + "of postcss-cssnext. \n") + _chalk2.default.grey("This most likely won't get any more support from browser vendors as the " + "spec is yet considered deprecated and alternative solutions are being " + "discussed. \n") + "Read more about the reason here https://github.com/pascalduez/postcss-apply.");
|
32 | }
|
33 | });
|
34 | };
|
35 | });
|
36 |
|
37 | exports.default = warnForDeprecations; |
\ | No newline at end of file |