clean up dynamic plugin loading

Summary:
There are 3 sources where plugins can be loaded from:
* `src/plugins`
* `src/fb/plugins`
* any path specified in `~/.sonar/config.json`

Plugins found in the first two directories are bundled with the app when building.

Reviewed By: jknoxville

Differential Revision: D8636061

fbshipit-source-id: 2064090d43d11695ffd99df195e5b594559fe087
This commit is contained in:
Daniel Büchele
2018-06-26 07:10:57 -07:00
committed by Facebook Github Bot
parent 70e11e8269
commit 5edb8bd770
9 changed files with 31 additions and 91 deletions

View File

@@ -10,16 +10,10 @@ import {
Button,
ButtonGroup,
FlexRow,
FlexBox,
Component,
Spacer,
Glyph,
GK,
} from 'sonar';
import {
loadsDynamicPlugins,
dynamicPluginPath,
} from '../utils/dynamicPluginLoading.js';
import {connect} from 'react-redux';
import {
toggleBugDialogVisible,
@@ -60,10 +54,6 @@ const TitleBar = FlexRow.extends(
},
);
const Icon = FlexBox.extends({
marginRight: 3,
});
type Props = {|
windowIsFocused: boolean,
leftSidebarVisible: boolean,
@@ -82,13 +72,6 @@ class SonarTitleBar extends Component<Props> {
<TitleBar focused={this.props.windowIsFocused} className="toolbar">
<DevicesButton />
<Spacer />
{loadsDynamicPlugins() && (
<Icon
title={`Plugins are loaded dynamically from ${dynamicPluginPath() ||
''}`}>
<Glyph color={colors.light30} name="flash-default" size={16} />
</Icon>
)}
{process.platform === 'darwin' ? <AutoUpdateVersion /> : null}
{config.bugReportButtonVisible && (
<Button