You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
710 B
25 lines
710 B
1 month ago
|
(function(exports) {
|
||
|
var RemoveProperty = function(less) {
|
||
|
this._visitor = new less.visitors.Visitor(this);
|
||
|
};
|
||
|
|
||
|
RemoveProperty.prototype = {
|
||
|
isReplacing: true,
|
||
|
run: function (root) {
|
||
|
return this._visitor.visit(root);
|
||
|
},
|
||
|
visitDeclaration: function (ruleNode, visitArgs) {
|
||
|
if (ruleNode.name != '-some-aribitrary-property') {
|
||
|
return ruleNode;
|
||
|
} else {
|
||
|
return [];
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
exports.install = function(less, pluginManager) {
|
||
|
pluginManager.addVisitor( new RemoveProperty(less));
|
||
|
};
|
||
|
|
||
|
})(typeof exports === 'undefined' ? this['VisitorPlugin'] = {} : exports);
|