From b10fb4533e5ef22b13fdb419b206f107b8ebc955 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 22 Feb 2017 12:27:24 -0800 Subject: [PATCH] All builtin plugins now standardized as functions --- index.html | 6 +++--- src/plugins/plugins.js | 24 +++++++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 9526465548..7f0a7c8891 100644 --- a/index.html +++ b/index.html @@ -36,9 +36,9 @@ ].forEach( openmct.legacyRegistry.enable.bind(openmct.legacyRegistry) ); - openmct.install(openmct.plugins.myItems); - openmct.install(openmct.plugins.localStorage); - openmct.install(openmct.plugins.espresso); + openmct.install(openmct.plugins.MyItems()); + openmct.install(openmct.plugins.LocalStorage()); + openmct.install(openmct.plugins.Espresso()); openmct.start(); }); diff --git a/src/plugins/plugins.js b/src/plugins/plugins.js index 724b811038..e33fb65f5e 100644 --- a/src/plugins/plugins.js +++ b/src/plugins/plugins.js @@ -24,18 +24,20 @@ define([ 'lodash' ], function (_) { var bundleMap = { - couchDB: 'platform/persistence/couch', - elasticsearch: 'platform/persistence/elastic', - espresso: 'platform/commonUI/themes/espresso', - localStorage: 'platform/persistence/local', - myItems: 'platform/features/my-items', - snow: 'platform/commonUI/themes/snow', - utcTimeSystem: 'platform/features/conductor/utcTimeSystem' + CouchDB: 'platform/persistence/couch', + Elasticsearch: 'platform/persistence/elastic', + Espresso: 'platform/commonUI/themes/espresso', + LocalStorage: 'platform/persistence/local', + MyItems: 'platform/features/my-items', + Snow: 'platform/commonUI/themes/snow', + UTCTimeSystem: 'platform/features/conductor/utcTimeSystem' }; var plugins = _.mapValues(bundleMap, function (bundleName, pluginName) { - return function (openmct) { - openmct.legacyRegistry.enable(bundleName); + return function pluginConstructor() { + return function (openmct) { + openmct.legacyRegistry.enable(bundleName); + }; }; }); @@ -57,7 +59,7 @@ define([ openmct.legacyRegistry.enable(bundleName); } - openmct.legacyRegistry.enable(bundleMap.couchDB); + openmct.legacyRegistry.enable(bundleMap.CouchDB); }; }; @@ -79,7 +81,7 @@ define([ openmct.legacyRegistry.enable(bundleName); } - openmct.legacyRegistry.enable(bundleMap.elasticsearch); + openmct.legacyRegistry.enable(bundleMap.Elasticsearch); }; };