53 lines
1.7 KiB
JavaScript
Raw Normal View History

// 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
2019-04-16 17:48:17 +02:00
import pluginPkg from '../../package.json';
import pluginId from './pluginId';
import pluginLogo from './assets/images/logo.svg';
2019-07-04 11:32:51 +02:00
import App from './containers/Main';
import ConfigureViewButton from './InjectedComponents/ContentTypeBuilder/ConfigureViewButton';
2019-04-18 19:54:21 +02:00
import lifecycles from './lifecycles';
import reducers from './reducers';
2019-04-18 19:54:21 +02:00
import trads from './translations';
2019-04-16 17:48:17 +02:00
export default strapi => {
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
const plugin = {
blockerComponent: null,
blockerComponentProps: {},
description: pluginDescription,
icon: pluginPkg.strapi.icon,
id: pluginId,
initializer: null,
injectedComponents: [
{
plugin: 'content-type-builder.listView',
area: 'list.link',
component: ConfigureViewButton,
key: 'content-manager.link',
},
],
injectionZones: {
editView: { informations: [] },
listView: { actions: [], deleteModalAdditionalInfos: [] },
},
isReady: true,
isRequired: pluginPkg.strapi.required || false,
layout: null,
lifecycles,
mainComponent: App,
name: pluginPkg.strapi.name,
pluginLogo,
preventComponentRendering: false,
reducers,
trads,
};
2019-04-16 17:48:17 +02:00
return strapi.registerPlugin(plugin);
2019-04-16 17:48:17 +02:00
};