mirror of
https://github.com/strapi/strapi.git
synced 2025-08-26 09:42:09 +00:00
Add front-end config for example plugin
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
22aed6c934
commit
091f00d500
@ -2,6 +2,7 @@
|
|||||||
**/build/**
|
**/build/**
|
||||||
**/dist/**
|
**/dist/**
|
||||||
testApp/**
|
testApp/**
|
||||||
|
examples/**
|
||||||
packages/strapi-generate-plugin/files/admin/src/**
|
packages/strapi-generate-plugin/files/admin/src/**
|
||||||
packages/strapi-helper-plugin/**
|
packages/strapi-helper-plugin/**
|
||||||
packages/strapi-plugin-users-permissions/admin/**
|
packages/strapi-plugin-users-permissions/admin/**
|
||||||
|
28
examples/getstarted/plugins/myplugin/admin/src/index.js
Normal file
28
examples/getstarted/plugins/myplugin/admin/src/index.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import pluginPkg from '../../package.json';
|
||||||
|
|
||||||
|
import pluginId from './pluginId';
|
||||||
|
|
||||||
|
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: [],
|
||||||
|
isReady: true,
|
||||||
|
leftMenuLinks: [],
|
||||||
|
leftMenuSections: [],
|
||||||
|
mainComponent: null,
|
||||||
|
name: pluginPkg.strapi.name,
|
||||||
|
preventComponentRendering: false,
|
||||||
|
settings: null,
|
||||||
|
trads: {},
|
||||||
|
};
|
||||||
|
|
||||||
|
return strapi.registerPlugin(plugin);
|
||||||
|
};
|
@ -0,0 +1,5 @@
|
|||||||
|
import pluginPkg from '../../package.json';
|
||||||
|
|
||||||
|
const pluginId = pluginPkg.name.replace(/^strapi-plugin-/i, '');
|
||||||
|
|
||||||
|
export default pluginId;
|
Loading…
x
Reference in New Issue
Block a user