Files
less.js/lib/less-browser/plugin-loader.js
Matthew Dean 7a47223dd9 Fixes #3187 (couldn't repo, but found bugs) (#3229)
* (Maybe) Fixes #3187 (couldn't repo, but found bug)
- Fixes multiple Node.js plugins not being loaded
* Added .eslintignore
* Added tests to fix #3187
* Fixed browser test
2018-06-30 00:24:46 -07:00

25 lines
667 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;
// Should we shim this.require for browser? Probably not?
};
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;