Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
710 bytes
|
Line | |
---|
1 | (function(exports) {
|
---|
2 | var RemoveProperty = function(less) {
|
---|
3 | this._visitor = new less.visitors.Visitor(this);
|
---|
4 | };
|
---|
5 |
|
---|
6 | RemoveProperty.prototype = {
|
---|
7 | isReplacing: true,
|
---|
8 | run: function (root) {
|
---|
9 | return this._visitor.visit(root);
|
---|
10 | },
|
---|
11 | visitDeclaration: function (ruleNode, visitArgs) {
|
---|
12 | if (ruleNode.name != '-some-aribitrary-property') {
|
---|
13 | return ruleNode;
|
---|
14 | } else {
|
---|
15 | return [];
|
---|
16 | }
|
---|
17 | }
|
---|
18 | };
|
---|
19 |
|
---|
20 | exports.install = function(less, pluginManager) {
|
---|
21 | pluginManager.addVisitor( new RemoveProperty(less));
|
---|
22 | };
|
---|
23 |
|
---|
24 | })(typeof exports === 'undefined' ? this['VisitorPlugin'] = {} : exports);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.