Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
881 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 | // TODO: Add tests for browser @plugin
|
---|
3 | /* global window */
|
---|
4 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
5 | var tslib_1 = require("tslib");
|
---|
6 | var abstract_plugin_loader_js_1 = tslib_1.__importDefault(require("../less/environment/abstract-plugin-loader.js"));
|
---|
7 | /**
|
---|
8 | * Browser Plugin Loader
|
---|
9 | */
|
---|
10 | var PluginLoader = function (less) {
|
---|
11 | this.less = less;
|
---|
12 | // Should we shim this.require for browser? Probably not?
|
---|
13 | };
|
---|
14 | PluginLoader.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 | });
|
---|
22 | exports.default = PluginLoader;
|
---|
23 | //# sourceMappingURL=plugin-loader.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.