mirror of
https://github.com/strapi/strapi.git
synced 2025-12-12 07:27:46 +00:00
update generators
Signed-off-by: soupette <cyril@strapi.io>
This commit is contained in:
parent
58790b682b
commit
ad7fc123c1
@ -14,7 +14,6 @@
|
||||
"dependencies": {
|
||||
"@strapi/admin": "3.6.8",
|
||||
"@strapi/plugin-documentation": "3.6.8",
|
||||
"@strapi/plugin-sentry": "3.6.8",
|
||||
"@strapi/plugin-graphql": "3.6.8",
|
||||
"@strapi/plugin-i18n": "3.6.8",
|
||||
"@strapi/plugin-users-permissions": "3.6.8",
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
/**
|
||||
*
|
||||
* PluginIcon
|
||||
*
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
|
||||
const IconWrapper = styled.span`
|
||||
svg.svg-inline--fa.fa-w-20 {
|
||||
width: 1rem;
|
||||
}
|
||||
`;
|
||||
|
||||
const PluginIcon = () => (
|
||||
<IconWrapper>
|
||||
<FontAwesomeIcon icon="plug" />
|
||||
</IconWrapper>
|
||||
);
|
||||
|
||||
export default PluginIcon;
|
||||
@ -1,15 +1,15 @@
|
||||
import { prefixPluginTranslations } from '@strapi/helper-plugin';
|
||||
import PluginIcon from './components/PluginIcon';
|
||||
import pluginPkg from '../../package.json';
|
||||
import pluginId from './pluginId';
|
||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
||||
const icon = pluginPkg.strapi.icon;
|
||||
|
||||
const name = pluginPkg.strapi.name;
|
||||
|
||||
export default {
|
||||
register(app) {
|
||||
app.addMenuLink({
|
||||
to: `/plugins/${pluginId}`,
|
||||
icon,
|
||||
icon: PluginIcon,
|
||||
intlLabel: {
|
||||
id: `${pluginId}.plugin.name`,
|
||||
defaultMessage: 'My plugin',
|
||||
@ -22,11 +22,7 @@ export default {
|
||||
permissions: [],
|
||||
});
|
||||
app.registerPlugin({
|
||||
description: pluginDescription,
|
||||
icon,
|
||||
id: pluginId,
|
||||
isReady: true,
|
||||
isRequired: pluginPkg.strapi.required || false,
|
||||
name,
|
||||
});
|
||||
},
|
||||
|
||||
@ -5,7 +5,6 @@
|
||||
"private": true,
|
||||
"strapi": {
|
||||
"name": "my-plugin",
|
||||
"icon": "plug",
|
||||
"description": "Description of my plugin.",
|
||||
"kind": "plugin"
|
||||
}
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
/**
|
||||
*
|
||||
* PluginIcon
|
||||
*
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
|
||||
const IconWrapper = styled.span`
|
||||
svg.svg-inline--fa.fa-w-20 {
|
||||
width: 1rem;
|
||||
}
|
||||
`;
|
||||
|
||||
const PluginIcon = () => (
|
||||
<IconWrapper>
|
||||
<FontAwesomeIcon icon="plug" />
|
||||
</IconWrapper>
|
||||
);
|
||||
|
||||
export default PluginIcon;
|
||||
@ -2,16 +2,15 @@ import { prefixPluginTranslations } from '@strapi/helper-plugin';
|
||||
import pluginPkg from '../../package.json';
|
||||
import pluginId from './pluginId';
|
||||
import Initializer from './components/Initializer';
|
||||
import PluginIcon from './components/PluginIcon';
|
||||
|
||||
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
|
||||
const icon = pluginPkg.strapi.icon;
|
||||
const name = pluginPkg.strapi.name;
|
||||
|
||||
export default {
|
||||
register(app) {
|
||||
app.addMenuLink({
|
||||
to: `/plugins/${pluginId}`,
|
||||
icon,
|
||||
icon: PluginIcon,
|
||||
intlLabel: {
|
||||
id: `${pluginId}.plugin.name`,
|
||||
defaultMessage: name,
|
||||
@ -30,12 +29,9 @@ export default {
|
||||
],
|
||||
});
|
||||
app.registerPlugin({
|
||||
description: pluginDescription,
|
||||
icon,
|
||||
id: pluginId,
|
||||
initializer: Initializer,
|
||||
isReady: false,
|
||||
isRequired: pluginPkg.strapi.required || false,
|
||||
name,
|
||||
});
|
||||
},
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
"description": "This is the description of the plugin.",
|
||||
"strapi": {
|
||||
"name": "{{ pluginName }}",
|
||||
"icon": "plug",
|
||||
"description": "Description of {{ pluginName }} plugin",
|
||||
"kind": "plugin"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user