Skip to content

Commit 8ce3efa

Browse files
committed
feat: update monorepo-networker
1 parent e715ce8 commit 8ce3efa

File tree

16 files changed

+3484
-159
lines changed

16 files changed

+3484
-159
lines changed

.github/assets/preview.png

1.6 KB
Loading

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
1. **_Logical Sides in Mind:_** Figma plugins that render a UI work on two different processes (split into code.js and index.html in Figma docs). This boilerplate keeps the sides separated by allowing them to share code (under ./src/common/).
3636

37-
2. **_Intercommunitive:_** Logical sides should be able to communicate with each other without creating huge and unscalable nested if statements. This boilerplate solves it by declaring isolated messages and handlers (under `./src/common/network/messages/`)! (Using the [Monorepo Networker](https://github.com/CoconutGoodie/monorepo-networker) library)
37+
2. **_Intercommunitive:_** Logical sides should be able to communicate with each other without creating huge and unscalable nested if statements. This boilerplate solves it by declaring isolated events and handlers (under `./src/common/networkSides.ts`)! (Using the [Monorepo Networker](https://github.com/CoconutGoodie/monorepo-networker) library)
3838

3939
3. **_Easy to Build:_** Configure the `figma.manifest.ts` config with your plugin credentials once, then just build with your everyday `npm run build` command! The `/dist` folder will be ready to publish already!
4040

@@ -99,7 +99,7 @@ After building, built `dist` folder is going to contain every artifact you need
9999

100100
- `src`
101101
- `src/common/` : Sources that are intended to be used both by plugin and ui logical sides.
102-
- `src/common/network/` : Networking logic & message declarations used by Plugin - UI logical sides' intercommunication. Whenever a new message type is needed, declare and register here.
102+
- `src/common/networkSides.ts` : Definitions of logical sides and the events each one accepts. Whenever a new event type is needed, declare and update here.
103103
- `src/plugin/` : Sources of the plugin logical side. Place everything that interracts with figma here.
104104
- `src/ui/` : Sources of the ui logical side, a classical Vite + React source base.
105105
- `scripts`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"build:plugin": "vite build -c ./vite.config.plugin.ts"
2121
},
2222
"dependencies": {
23-
"monorepo-networker": "^1.5.2",
23+
"monorepo-networker": "^2.0.0",
2424
"react": "^18.2.0",
2525
"react-dom": "^18.2.0"
2626
},

0 commit comments

Comments
 (0)