Files
less.js/lib/less-browser/plugin-loader.js
Matthew Dean 42fd7dca20 Release v3.5.0 beta (#3230)
* Lint cleanup of quotes
* v3.5.0-beta
2018-06-24 20:14:33 -07:00

26 lines
666 B
JavaScript

// TODO: Add tests for browser @plugin
/* global window */
var AbstractPluginLoader = require('../less/environment/abstract-plugin-loader.js');
/**
* Browser Plugin Loader
*/
var PluginLoader = function(less) {
this.less = less;
// shim for browser require?
this.require = require;
};
PluginLoader.prototype = new AbstractPluginLoader();
PluginLoader.prototype.loadPlugin = function(filename, basePath, context, environment, fileManager) {
return new Promise(function(fulfill, reject) {
fileManager.loadFile(filename, basePath, context, environment)
.then(fulfill).catch(reject);
});
};
module.exports = PluginLoader;