Open-source IoT Platform - Device management, data collection, processing and visualization.
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.
 
 
 
 
 
 

26 lines
661 B

// TODO: Add tests for browser @plugin
/* global window */
import AbstractPluginLoader from '../less/environment/abstract-plugin-loader.js';
/**
* Browser Plugin Loader
*/
class PluginLoader extends AbstractPluginLoader {
constructor(less) {
super();
this.less = less;
// Should we shim this.require for browser? Probably not?
}
loadPlugin(filename, basePath, context, environment, fileManager) {
return new Promise((fulfill, reject) => {
fileManager.loadFile(filename, basePath, context, environment)
.then(fulfill).catch(reject);
});
}
}
export default PluginLoader;