mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
Allow root functions defined via @plugin
This commit is contained in:
11
test/less/plugin/plugin-root.js
Normal file
11
test/less/plugin/plugin-root.js
Normal file
@@ -0,0 +1,11 @@
|
||||
functions.addMultiple({
|
||||
"test-detached-ruleset" : function() {
|
||||
var rule = new tree.Rule('prop', new tree.Anonymous('value'));
|
||||
return new tree.DetachedRuleset(new tree.Ruleset("", [ rule ]));
|
||||
},
|
||||
"test-directive": function() {
|
||||
return new tree.Directive("@charset", new tree.Anonymous('"utf-8"'));
|
||||
},
|
||||
// Functions must return something. Must 'return true' if they produce no output.
|
||||
"test-undefined": function() { }
|
||||
});
|
||||
Reference in New Issue
Block a user