Updated from some -dev modules to alpha, beta or full releases
[yaffs-website] / node_modules / uncss / node_modules / postcss / lib / at-rule.js
1 'use strict';
2
3 exports.__esModule = true;
4
5 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; }; }();
6
7 var _container = require('./container');
8
9 var _container2 = _interopRequireDefault(_container);
10
11 var _warnOnce = require('./warn-once');
12
13 var _warnOnce2 = _interopRequireDefault(_warnOnce);
14
15 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
17 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18
19 function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
20
21 function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
22
23 var AtRule = function (_Container) {
24     _inherits(AtRule, _Container);
25
26     function AtRule(defaults) {
27         _classCallCheck(this, AtRule);
28
29         var _this = _possibleConstructorReturn(this, _Container.call(this, defaults));
30
31         _this.type = 'atrule';
32         return _this;
33     }
34
35     AtRule.prototype.append = function append() {
36         var _Container$prototype$;
37
38         if (!this.nodes) this.nodes = [];
39
40         for (var _len = arguments.length, children = Array(_len), _key = 0; _key < _len; _key++) {
41             children[_key] = arguments[_key];
42         }
43
44         return (_Container$prototype$ = _Container.prototype.append).call.apply(_Container$prototype$, [this].concat(children));
45     };
46
47     AtRule.prototype.prepend = function prepend() {
48         var _Container$prototype$2;
49
50         if (!this.nodes) this.nodes = [];
51
52         for (var _len2 = arguments.length, children = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
53             children[_key2] = arguments[_key2];
54         }
55
56         return (_Container$prototype$2 = _Container.prototype.prepend).call.apply(_Container$prototype$2, [this].concat(children));
57     };
58
59     /* istanbul ignore next */
60
61
62     _createClass(AtRule, [{
63         key: 'afterName',
64         get: function get() {
65             (0, _warnOnce2.default)('AtRule#afterName was deprecated. Use AtRule#raws.afterName');
66             return this.raws.afterName;
67         }
68
69         /* istanbul ignore next */
70         ,
71         set: function set(val) {
72             (0, _warnOnce2.default)('AtRule#afterName was deprecated. Use AtRule#raws.afterName');
73             this.raws.afterName = val;
74         }
75
76         /* istanbul ignore next */
77
78     }, {
79         key: '_params',
80         get: function get() {
81             (0, _warnOnce2.default)('AtRule#_params was deprecated. Use AtRule#raws.params');
82             return this.raws.params;
83         }
84
85         /* istanbul ignore next */
86         ,
87         set: function set(val) {
88             (0, _warnOnce2.default)('AtRule#_params was deprecated. Use AtRule#raws.params');
89             this.raws.params = val;
90         }
91     }]);
92
93     return AtRule;
94 }(_container2.default);
95
96 exports.default = AtRule;
97 module.exports = exports['default'];