Skip to content

Commit

Permalink
fix(plugins): Fix linter error and rename file
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen authored and mergify[bot] committed Dec 17, 2019
1 parent 179c5f1 commit 932a947
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/scripts/modules/core/src/core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { RECENT_HISTORY_SERVICE } from 'core/history';
require('root/app/fonts/spinnaker/icons.css');

import './analytics/GoogleAnalyticsInitializer';
import { pluginSupport } from './plugins/pluginSupport';
import { sharedLibraries } from './plugins/sharedLibraries';
import { ANALYTICS_MODULE } from './analytics/angulartics.module';
import { APPLICATION_BOOTSTRAP_MODULE } from './bootstrap';
import { APPLICATION_MODULE } from './application/application.module';
Expand Down Expand Up @@ -94,7 +94,7 @@ templates.keys().forEach(function(key) {
templates(key);
});

pluginSupport.exposeSharedLibraries();
sharedLibraries.exposeSharedLibraries();

export const CORE_MODULE = 'spinnaker.core';
module(CORE_MODULE, [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as lodash from 'lodash';
import * as react from 'react';
import * as react_dom from 'react-dom';
import * as spinnaker_core from '@spinnaker/core';
import * as reactDOM from 'react-dom';
import * as spinnakerCore from '@spinnaker/core';

export const pluginSupport = {
export const sharedLibraries = {
sharedLibraryNames: [
'lodash',
'react',
Expand All @@ -13,6 +13,7 @@ export const pluginSupport = {
'@spinnaker/core',
],

// This is the global (window) variable that the shared libs will be exposed on
globalVariablePrefix: 'spinnaker.plugins.sharedLibraries',

sanitizeLibraryName(libraryName: string): string {
Expand All @@ -31,8 +32,8 @@ export const pluginSupport = {
if (destinationObject) {
exposeSharedLibrary('lodash', lodash);
exposeSharedLibrary('react', react);
exposeSharedLibrary('react-dom', react_dom);
exposeSharedLibrary('@spinnaker/core', spinnaker_core);
exposeSharedLibrary('react-dom', reactDOM);
exposeSharedLibrary('@spinnaker/core', spinnakerCore);
}
},
};

0 comments on commit 932a947

Please sign in to comment.