allow for passing a context of evaluation to the importer
This commit is contained in:
parent
e480289a29
commit
336b655e16
@ -19,7 +19,7 @@ var less = {
|
||||
require(path.join('less', 'tree', n));
|
||||
});
|
||||
|
||||
less.Parser.importer = function (file, paths, callback) {
|
||||
less.Parser.importer = function (file, paths, callback, context) {
|
||||
var pathname;
|
||||
|
||||
paths.unshift('.');
|
||||
@ -48,7 +48,7 @@ less.Parser.importer = function (file, paths, callback) {
|
||||
paths: [path.dirname(pathname)]
|
||||
}).parse(data, function (e, root) {
|
||||
if (e) process.stdio.writeError(e);
|
||||
callback(root);
|
||||
callback.call(context || null, root);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user