index.js 658 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. var _postcss = require('postcss');
  6. var _postcss2 = _interopRequireDefault(_postcss);
  7. var _decl = require('./lib/decl');
  8. var _decl2 = _interopRequireDefault(_decl);
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. exports.default = _postcss2.default.plugin('postcss-merge-longhand', () => {
  11. return css => {
  12. css.walkRules(rule => {
  13. _decl2.default.forEach(p => {
  14. p.explode(rule);
  15. p.merge(rule);
  16. });
  17. });
  18. };
  19. });
  20. module.exports = exports['default'];