mirror of
https://github.com/strapi/strapi.git
synced 2025-08-07 00:09:23 +00:00
47 lines
1.5 KiB
JavaScript
47 lines
1.5 KiB
JavaScript
// NOTE TO PLUGINS DEVELOPERS:
|
|
// If you modify this file by adding new options to the plugin entry point
|
|
// Here's the file: strapi/docs/3.0.0-beta.x/plugin-development/frontend-field-api.md
|
|
// Here's the file: strapi/docs/3.0.0-beta.x/guides/registering-a-field-in-admin.md
|
|
// Also the strapi-generate-plugins/files/admin/src/index.js needs to be updated
|
|
// IF THE DOC IS NOT UPDATED THE PULL REQUEST WILL NOT BE MERGED
|
|
|
|
import pluginPkg from '../../package.json';
|
|
import pluginLogo from './assets/images/logo.svg';
|
|
import layout from '../../config/layout';
|
|
import pluginId from './pluginId';
|
|
import App from './containers/App';
|
|
import Initializer from './containers/Initializer';
|
|
import lifecycles from './lifecycles';
|
|
import reducers from './reducers';
|
|
import trads from './translations';
|
|
|
|
export default strapi => {
|
|
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
|
|
|
const plugin = {
|
|
blockerComponent: null,
|
|
blockerComponentProps: {},
|
|
description: pluginDescription,
|
|
icon: pluginPkg.strapi.icon,
|
|
id: pluginId,
|
|
initializer: Initializer,
|
|
injectedComponents: [],
|
|
isRequired: pluginPkg.strapi.required || false,
|
|
layout,
|
|
lifecycles,
|
|
leftMenuLinks: [],
|
|
leftMenuSections: [],
|
|
mainComponent: App,
|
|
name: pluginPkg.strapi.name,
|
|
pluginLogo,
|
|
preventComponentRendering: false,
|
|
reducers,
|
|
settings: {},
|
|
suffixUrl: () => '/roles',
|
|
suffixUrlToReplaceForLeftMenuHighlight: '/roles',
|
|
trads,
|
|
};
|
|
|
|
return strapi.registerPlugin(plugin);
|
|
};
|