You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
665 B
25 lines
665 B
// 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;
|
|
|
|
|