source: trip-planner-front/node_modules/postcss-calc/dist/index.js@ 6c1585f

Last change on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = void 0;
7
8var _transform = _interopRequireDefault(require("./lib/transform"));
9
10function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
12function pluginCreator(opts) {
13 const options = Object.assign({
14 precision: 5,
15 preserve: false,
16 warnWhenCannotResolve: false,
17 mediaQueries: false,
18 selectors: false
19 }, opts);
20 return {
21 postcssPlugin: 'postcss-calc',
22
23 OnceExit(css, {
24 result
25 }) {
26 css.walk(node => {
27 const {
28 type
29 } = node;
30
31 if (type === 'decl') {
32 (0, _transform.default)(node, "value", options, result);
33 }
34
35 if (type === 'atrule' && options.mediaQueries) {
36 (0, _transform.default)(node, "params", options, result);
37 }
38
39 if (type === 'rule' && options.selectors) {
40 (0, _transform.default)(node, "selector", options, result);
41 }
42 });
43 }
44
45 };
46}
47
48pluginCreator.postcss = true;
49var _default = pluginCreator;
50exports.default = _default;
51module.exports = exports.default;
Note: See TracBrowser for help on using the repository browser.