migrate emby-ratingbutton, scrollbuttons and select to ES6 modules

This commit is contained in:
Cameron 2020-07-08 16:40:30 +01:00
parent 1f8ce6e6f4
commit 5a1e01c650
4 changed files with 30 additions and 9 deletions

View File

@ -132,6 +132,9 @@
"src/controllers/dashboard/logs.js",
"src/controllers/user/subtitles.js",
"src/controllers/dashboard/plugins/repositories.js",
"src/elements/emby-ratingbutton/emby-ratingbutton.js",
"src/elements/emby-scrollbuttons/emby-scrollbuttons.js",
"src/elements/emby-select/emby-select.js",
"src/plugins/bookPlayer/plugin.js",
"src/plugins/bookPlayer/tableOfContents.js",
"src/plugins/photoPlayer/plugin.js",

View File

@ -1,5 +1,10 @@
define(['connectionManager', 'serverNotifications', 'events', 'globalize', 'emby-button'], function (connectionManager, serverNotifications, events, globalize, EmbyButtonPrototype) {
'use strict';
import connectionManager from 'connectionManager';
import serverNotifications from 'serverNotifications';
import events from 'events';
import globalize from 'globalize';
import EmbyButtonPrototype from 'emby-button';
/* eslint-disable indent */
function addNotificationEvent(instance, name, handler) {
@ -199,4 +204,5 @@ define(['connectionManager', 'serverNotifications', 'events', 'globalize', 'emby
prototype: EmbyRatingButtonPrototype,
extends: 'button'
});
});
/* eslint-enable indent */

View File

@ -1,5 +1,10 @@
define(['layoutManager', 'dom', 'css!./emby-scrollbuttons', 'registerElement', 'paper-icon-button-light'], function (layoutManager, dom) {
'use strict';
import layoutManager from 'layoutManager';
import dom from 'dom';
import 'css!./emby-scrollbuttons';
import 'registerElement';
import 'paper-icon-button-light';
/* eslint-disable indent */
var EmbyScrollButtonsPrototype = Object.create(HTMLDivElement.prototype);
@ -175,4 +180,5 @@ define(['layoutManager', 'dom', 'css!./emby-scrollbuttons', 'registerElement', '
prototype: EmbyScrollButtonsPrototype,
extends: 'div'
});
});
/* eslint-enable indent */

View File

@ -1,5 +1,10 @@
define(['layoutManager', 'browser', 'actionsheet', 'css!./emby-select', 'registerElement'], function (layoutManager, browser, actionsheet) {
'use strict';
import layoutManager from 'layoutManager';
import browser from 'browser';
import actionsheet from 'actionsheet';
import 'css!./emby-select';
import 'registerElement';
/* eslint-disable indent */
var EmbySelectPrototype = Object.create(HTMLSelectElement.prototype);
@ -159,4 +164,5 @@ define(['layoutManager', 'browser', 'actionsheet', 'css!./emby-select', 'registe
prototype: EmbySelectPrototype,
extends: 'select'
});
});
/* eslint-enable indent */