-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
1,600 additions
and
569 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Deploy contributor doc | |
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'develop' | ||
paths: | ||
- 'docs/**' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...started/src/plugins/myplugin/package.json → ...ted/src/plugins/local-plugin/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"name": "strapi-plugin-my-plugin", | ||
"name": "strapi-plugin-local-plugin", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "This is the description of my plugin.", | ||
"strapi": { | ||
"name": "my-plugin", | ||
"description": "Description of my plugin.", | ||
"name": "local-plugin", | ||
"description": "This plugin is linked as a local plugin", | ||
"kind": "plugin" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import admin from './admin/src'; | ||
|
||
export default admin; |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
examples/plugins/workspace-plugin/admin/src/components/PluginIcon/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* | ||
* PluginIcon | ||
* | ||
*/ | ||
|
||
import React from 'react'; | ||
import { Puzzle } from '@strapi/icons'; | ||
|
||
const PluginIcon = () => <Puzzle />; | ||
|
||
export default PluginIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import PluginIcon from './components/PluginIcon'; | ||
import pluginPkg from '../../package.json'; | ||
import pluginId from './pluginId'; | ||
|
||
const name = pluginPkg.strapi.name; | ||
|
||
export default { | ||
register(app) { | ||
app.addMenuLink({ | ||
to: `/plugins/${pluginId}`, | ||
icon: PluginIcon, | ||
intlLabel: { | ||
id: `${pluginId}.plugin.name`, | ||
defaultMessage: 'My plugin', | ||
}, | ||
Component: async () => { | ||
const component = await import('./pages/App'); | ||
|
||
return component; | ||
}, | ||
permissions: [], | ||
}); | ||
|
||
app.registerPlugin({ | ||
id: pluginId, | ||
name, | ||
}); | ||
}, | ||
}; |
5 changes: 5 additions & 0 deletions
5
examples/plugins/workspace-plugin/admin/src/pages/App/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const App = () => { | ||
return 'I am a workspace plugin, imported via node_modules.'; | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import pluginPkg from '../../package.json'; | ||
|
||
const pluginId = pluginPkg.name.replace(/^strapi-plugin-/i, ''); | ||
|
||
export default pluginId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "strapi-plugin-workspace-plugin", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "This is the description of my plugin.", | ||
"exports": { | ||
"./strapi-admin": { | ||
"source": "./admin/src/index.js", | ||
"require": "./admin/src/index.js", | ||
"default": "./admin/src/index.js" | ||
}, | ||
"./strapi-server": { | ||
"source": "./strapi-server.js", | ||
"require": "./strapi-server.js", | ||
"default": "./strapi-server.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"strapi": { | ||
"name": "my-plugin", | ||
"description": "This plugin is used as an npm module and linked that way.", | ||
"kind": "plugin" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
default: { | ||
testConf: 1, | ||
}, | ||
validator: (config) => { | ||
if (typeof config.testConf !== 'number') { | ||
throw new Error('testConfig has to be a number'); | ||
} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'use strict'; | ||
|
||
module.exports = ({ strapi }) => {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use strict'; | ||
|
||
const config = require('./server/config'); | ||
const register = require('./server/register'); | ||
module.exports = () => { | ||
return { | ||
register, | ||
config, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.