UNPKG

881 BJavaScriptView Raw
1"use strict";
2// TODO: Add tests for browser @plugin
3/* global window */
4Object.defineProperty(exports, "__esModule", { value: true });
5var tslib_1 = require("tslib");
6var abstract_plugin_loader_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-plugin-loader.js"));
7/**
8 * Browser Plugin Loader
9 */
10var PluginLoader = function (less) {
11 this.less = less;
12 // Should we shim this.require for browser? Probably not?
13};
14PluginLoader.prototype = Object.assign(new abstract_plugin_loader_js_1.default(), {
15 loadPlugin: function (filename, basePath, context, environment, fileManager) {
16 return new Promise(function (fulfill, reject) {
17 fileManager.loadFile(filename, basePath, context, environment)
18 .then(fulfill).catch(reject);
19 });
20 }
21});
22exports.default = PluginLoader;
23//# sourceMappingURL=plugin-loader.js.map
\No newline at end of file