From a124e53a9ad317d289e5a7ee007746aa6416b458 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 10 Sep 2015 15:06:42 +0100 Subject: [PATCH] Component broker loading files never really worked very well anyway, and now it can't work because they're all defined elsewhere. --- src/ComponentBroker.js | 48 +----------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) diff --git a/src/ComponentBroker.js b/src/ComponentBroker.js index 6445e9472f..831312b1dc 100644 --- a/src/ComponentBroker.js +++ b/src/ComponentBroker.js @@ -16,11 +16,6 @@ limitations under the License. 'use strict'; -function load(name) { - var module = require("../skins/base/views/"+name); - return module; -}; - var ComponentBroker = function() { this.components = {}; }; @@ -30,9 +25,7 @@ ComponentBroker.prototype = { if (this.components[name]) { return this.components[name]; } - - this.components[name] = load(name); - return this.components[name]; + return null; }, set: function(name, module) { @@ -51,42 +44,3 @@ if (global.componentBroker === undefined) { } module.exports = global.componentBroker; -// We need to tell browserify to include all the components -// by direct require syntax in here, but we don't want them -// to be evaluated in this file because then we wouldn't be -// able to override them. if (0) does this. -// Must be in this file (because the require is file-specific) and -// must be at the end because the components include this file. -if (0) { -require('../skins/base/views/atoms/LogoutButton'); -require('../skins/base/views/atoms/EnableNotificationsButton'); -require('../skins/base/views/atoms/MessageTimestamp'); -require('../skins/base/views/atoms/create_room/CreateRoomButton'); -require('../skins/base/views/atoms/create_room/RoomNameTextbox'); -require('../skins/base/views/atoms/create_room/Presets'); -require('../skins/base/views/atoms/EditableText'); -require('../skins/base/views/molecules/MatrixToolbar'); -require('../skins/base/views/molecules/RoomTile'); -require('../skins/base/views/molecules/MessageTile'); -require('../skins/base/views/molecules/SenderProfile'); -require('../skins/base/views/molecules/UnknownMessageTile'); -require('../skins/base/views/molecules/MTextTile'); -require('../skins/base/views/molecules/MNoticeTile'); -require('../skins/base/views/molecules/MEmoteTile'); -require('../skins/base/views/molecules/MImageTile'); -require('../skins/base/views/molecules/MFileTile'); -require('../skins/base/views/molecules/MRoomMemberTile'); -require('../skins/base/views/molecules/RoomHeader'); -require('../skins/base/views/molecules/MessageComposer'); -require('../skins/base/views/molecules/ProgressBar'); -require('../skins/base/views/molecules/ServerConfig'); -require('../skins/base/views/organisms/MemberList'); -require('../skins/base/views/molecules/MemberTile'); -require('../skins/base/views/organisms/RoomList'); -require('../skins/base/views/organisms/RoomView'); -require('../skins/base/views/templates/Login'); -require('../skins/base/views/templates/Register'); -require('../skins/base/views/organisms/Notifier'); -require('../skins/base/views/organisms/CreateRoom'); -require('../skins/base/views/molecules/UserSelector'); -}