mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Allow adding plugins via @import (plugin)
This commit is contained in:
@@ -50,7 +50,7 @@ Import.prototype.accept = function (visitor) {
|
||||
this.features = visitor.visit(this.features);
|
||||
}
|
||||
this.path = visitor.visit(this.path);
|
||||
if (!this.options.inline && this.root) {
|
||||
if (!this.options.plugin && !this.options.inline && this.root) {
|
||||
this.root = visitor.visit(this.root);
|
||||
}
|
||||
};
|
||||
@@ -120,7 +120,9 @@ Import.prototype.eval = function (context) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.options.inline) {
|
||||
if (this.options.plugin) {
|
||||
return [];
|
||||
} else if (this.options.inline) {
|
||||
var contents = new Anonymous(this.root, 0, {filename: this.importedFilename}, true, true);
|
||||
return this.features ? new Media([contents], this.features.value) : [contents];
|
||||
} else if (this.css) {
|
||||
|
||||
Reference in New Issue
Block a user