2019-10-10 11:45:26 +02:00
|
|
|
import pluginPkg from '../../package.json';
|
|
|
|
import pluginId from './pluginId';
|
|
|
|
import App from './containers/App';
|
|
|
|
import Initializer from './containers/Initializer';
|
|
|
|
import lifecycles from './lifecycles';
|
|
|
|
import trads from './translations';
|
|
|
|
|
2020-03-05 17:40:40 +01:00
|
|
|
export default strapi => {
|
|
|
|
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
2019-10-10 11:45:26 +02:00
|
|
|
|
2020-03-05 17:40:40 +01:00
|
|
|
const plugin = {
|
|
|
|
blockerComponent: null,
|
|
|
|
blockerComponentProps: {},
|
|
|
|
description: pluginDescription,
|
|
|
|
icon: pluginPkg.strapi.icon,
|
|
|
|
id: pluginId,
|
|
|
|
initializer: Initializer,
|
|
|
|
injectedComponents: [],
|
|
|
|
isReady: false,
|
|
|
|
isRequired: pluginPkg.strapi.required || false,
|
|
|
|
layout: null,
|
|
|
|
lifecycles,
|
|
|
|
leftMenuLinks: [],
|
|
|
|
leftMenuSections: [],
|
|
|
|
mainComponent: App,
|
|
|
|
name: pluginPkg.strapi.name,
|
|
|
|
preventComponentRendering: false,
|
|
|
|
trads,
|
|
|
|
};
|
2019-10-10 11:45:26 +02:00
|
|
|
|
2020-03-05 17:40:40 +01:00
|
|
|
return strapi.registerPlugin(plugin);
|
2019-10-10 11:45:26 +02:00
|
|
|
};
|