mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-06 14:50:21 -05:00
feat: updated ports and documentation for easier development
This commit is contained in:
parent
adb9ad0adb
commit
7283a9bd36
8 changed files with 30 additions and 14 deletions
15
README.md
15
README.md
|
@ -62,6 +62,21 @@ Open in your browser: `http://localhost:4210/`
|
|||
|
||||
- if you want to create a new plugin, read the following [README](docs/create-plugin.md)
|
||||
|
||||
## Sample plugins
|
||||
|
||||
| Plugin | Description | PORT | Start command | Manifest URL |
|
||||
| ---------------- | ----------------------------------------------------------- | ---- | ----------------------------- | ------------------------------------------ |
|
||||
| poc-state-plugin | Sandbox plugin to test new plugins api functionality | 4301 | npm run start:pc-plugin | http://localhost:4301/assets/manifest.json |
|
||||
| contrast-plugin | Sample plugin that gives you color contrast information | 4302 | npm run start:contrast-plugin | http://localhost:4302/manifest.json |
|
||||
| icons-plugin | Tool to add icons from [Feather](https://feathericons.com/) | 4303 | npm run start:icons-plugin | http://localhost:4303/assets/manifest.json |
|
||||
|
||||
## Web Apps
|
||||
|
||||
| App | Description | PORT | Start command | URL |
|
||||
| --------------- | ----------------------------------------------------------------- | ---- | ---------------------------- | ---------------------- |
|
||||
| plugins-runtime | Runtime for the plugins subsystem | 4200 | npm run start | |
|
||||
| example-styles | Showcase of some of the Penpot styles that can be used in plugins | 4201 | npm run start:styles-example | http://localhost:4201/ |
|
||||
|
||||
## License
|
||||
|
||||
```
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Contrast plugin",
|
||||
"host": "http://localhost:4210",
|
||||
"host": "http://localhost:4302",
|
||||
"code": "/plugin.js",
|
||||
"permissions": [
|
||||
"page:read",
|
||||
|
|
|
@ -8,13 +8,13 @@ export default defineConfig({
|
|||
cacheDir: '../../node_modules/.vite/apps/contrast-plugin',
|
||||
|
||||
server: {
|
||||
port: 4200,
|
||||
host: 'localhost',
|
||||
port: 4302,
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
|
||||
preview: {
|
||||
port: 4210,
|
||||
host: 'localhost',
|
||||
port: 4302,
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
|
||||
plugins: [nxViteTsPaths()],
|
||||
|
|
|
@ -8,13 +8,13 @@ export default defineConfig({
|
|||
cacheDir: '../../node_modules/.vite/apps/example-styles',
|
||||
|
||||
server: {
|
||||
port: 4200,
|
||||
host: 'localhost',
|
||||
port: 4201,
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
|
||||
preview: {
|
||||
port: 4300,
|
||||
host: 'localhost',
|
||||
port: 4201,
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
|
||||
plugins: [nxViteTsPaths()],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Icons plugin",
|
||||
"host": "http://localhost:4202",
|
||||
"host": "http://localhost:4303",
|
||||
"code": "/assets/plugin.js",
|
||||
"permissions": [
|
||||
"page:read",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "POC State Read",
|
||||
"description": "Sandbox plugin for plugins development",
|
||||
"host": "http://localhost:4202",
|
||||
"host": "http://localhost:4301",
|
||||
"code": "/assets/plugin.js",
|
||||
"icon": "/assets/icon.png",
|
||||
"permissions": [
|
||||
|
|
|
@ -52,6 +52,7 @@ export default defineConfig({
|
|||
sourcemap: true,
|
||||
},
|
||||
preview: {
|
||||
host: '0.0.0.0',
|
||||
port: 4200,
|
||||
},
|
||||
test: {
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "concurrently --kill-others --names build,server \"npx nx run plugins-runtime:build --watch --mode development\" \"npx nx run plugins-runtime:preview\"",
|
||||
"start:pc-plugin": "npx nx run-many --targets=buildPlugin,serve --projects=poc-state-plugin --watch",
|
||||
"start:pc-plugin": "npx nx run-many --targets=buildPlugin,serve --projects=poc-state-plugin --watch --host 0.0.0.0 --port 4301",
|
||||
"start:contrast-plugin": "npx nx run contrast-plugin:build --watch & npx nx run contrast-plugin:preview",
|
||||
"start:rpc-api": "npx nx serve rpc-api",
|
||||
"start:styles-example": "npx nx run example-styles:serve --port 4202",
|
||||
"start:icons-plugin": "npx nx run-many --targets=buildPlugin,serve --projects=icons-plugin --watch --port 4202",
|
||||
"start:styles-example": "npx nx run example-styles:serve --host 0.0.0.0 --port 4201",
|
||||
"start:icons-plugin": "npx nx run-many --targets=buildPlugin,serve --projects=icons-plugin --watch --host 0.0.0.0 --port 4303",
|
||||
"build": "npx nx build plugins-runtime --emptyOutDir=true",
|
||||
"lint": "nx run-many --all --target=lint --parallel",
|
||||
"lint:affected": "npx nx affected --target=lint",
|
||||
|
|
Loading…
Reference in a new issue