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
|
|
|
|
|
2020-02-11 17:15:53 +01:00
|
|
|
import pluginPkg from '../../package.json';
|
|
|
|
import pluginId from './pluginId';
|
|
|
|
import pluginLogo from './assets/images/logo.svg';
|
|
|
|
|
|
|
|
export default strapi => {
|
2020-03-02 15:18:08 +01:00
|
|
|
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
2020-02-11 17:15:53 +01:00
|
|
|
|
|
|
|
const plugin = {
|
|
|
|
blockerComponent: null,
|
|
|
|
blockerComponentProps: {},
|
|
|
|
description: pluginDescription,
|
|
|
|
icon: pluginPkg.strapi.icon,
|
|
|
|
id: pluginId,
|
|
|
|
isReady: true,
|
|
|
|
initializer: () => null,
|
|
|
|
injectedComponents: [],
|
2020-02-28 11:40:55 +01:00
|
|
|
isRequired: pluginPkg.strapi.required || false,
|
2020-02-11 17:15:53 +01:00
|
|
|
layout: null,
|
|
|
|
lifecycles: () => {},
|
|
|
|
mainComponent: null,
|
|
|
|
name: pluginPkg.strapi.name,
|
|
|
|
pluginLogo,
|
|
|
|
preventComponentRendering: false,
|
|
|
|
trads: {},
|
|
|
|
};
|
|
|
|
|
|
|
|
return strapi.registerPlugin(plugin);
|
|
|
|
};
|