2020-03-06 13:33:07 +01:00
|
|
|
// 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 18:05:12 +02:00
|
|
|
import pluginPkg from '../../package.json';
|
2020-06-10 14:42:36 +02:00
|
|
|
import pluginPermissions from './permissions';
|
2019-04-16 18:05:12 +02:00
|
|
|
import pluginId from './pluginId';
|
2020-02-11 17:15:53 +01:00
|
|
|
import pluginLogo from './assets/images/logo.svg';
|
2019-04-16 18:05:12 +02:00
|
|
|
import App from './containers/App';
|
2019-04-18 20:47:57 +02:00
|
|
|
import trads from './translations';
|
2019-04-16 18:05:12 +02:00
|
|
|
|
2020-01-23 16:46:50 +01:00
|
|
|
export default strapi => {
|
2020-03-02 15:18:08 +01:00
|
|
|
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
2020-06-09 12:05:59 +02:00
|
|
|
const icon = pluginPkg.strapi.icon;
|
|
|
|
const name = pluginPkg.strapi.name;
|
2020-01-23 16:46:50 +01:00
|
|
|
const plugin = {
|
|
|
|
blockerComponent: null,
|
|
|
|
blockerComponentProps: {},
|
|
|
|
description: pluginDescription,
|
2020-06-09 12:05:59 +02:00
|
|
|
icon,
|
2020-01-23 16:46:50 +01:00
|
|
|
id: pluginId,
|
|
|
|
injectedComponents: [],
|
2021-05-04 17:21:15 +02:00
|
|
|
isReady: true,
|
2020-02-28 11:40:55 +01:00
|
|
|
isRequired: pluginPkg.strapi.required || false,
|
2020-01-23 16:46:50 +01:00
|
|
|
mainComponent: App,
|
2020-06-09 12:05:59 +02:00
|
|
|
name,
|
2020-02-11 17:15:53 +01:00
|
|
|
pluginLogo,
|
2020-01-23 16:46:50 +01:00
|
|
|
preventComponentRendering: false,
|
|
|
|
trads,
|
2020-06-09 12:05:59 +02:00
|
|
|
menu: {
|
|
|
|
pluginsSectionLinks: [
|
|
|
|
{
|
|
|
|
destination: `/plugins/${pluginId}`,
|
|
|
|
icon,
|
|
|
|
label: {
|
|
|
|
id: `${pluginId}.plugin.name`,
|
|
|
|
defaultMessage: 'Documentation',
|
|
|
|
},
|
|
|
|
name,
|
2020-06-10 14:42:36 +02:00
|
|
|
permissions: pluginPermissions.main,
|
2020-06-09 12:05:59 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2020-01-23 16:46:50 +01:00
|
|
|
};
|
2019-04-16 18:05:12 +02:00
|
|
|
|
2020-01-23 16:46:50 +01:00
|
|
|
return strapi.registerPlugin(plugin);
|
2019-04-16 18:05:12 +02:00
|
|
|
};
|