mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add dev tools design notes
This commit is contained in:
parent
42f792ed77
commit
61435b582e
66
webpack/dev-server/design.md
Normal file
66
webpack/dev-server/design.md
Normal file
@ -0,0 +1,66 @@
|
||||
# Bilibili Evolved Dev Tools
|
||||
|
||||
## Server
|
||||
|
||||
### Serve components
|
||||
Serve (watch) contents:
|
||||
- `./registry/dist/*` -> `localhost:2333/registry/*`: Build on demand, cache 16 items by default.
|
||||
- `./dist/` -> `localhost:2333/core/*`: Build at startup.
|
||||
|
||||
### WebSocket
|
||||
Dev server on WebSocket: `ws://localhost:2333`
|
||||
|
||||
Send Messages:
|
||||
|
||||
`start`
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
`coreUpdate`
|
||||
```json
|
||||
{
|
||||
"type": "core",
|
||||
"path": "core/bilibili-evolved.dev.user.js"
|
||||
}
|
||||
```
|
||||
|
||||
`itemUpdate`
|
||||
```json
|
||||
{
|
||||
"name": "name",
|
||||
"displayName": "Display Name",
|
||||
"type": "component",
|
||||
"path": "registry/components/feeds/copy-link.js"
|
||||
}
|
||||
```
|
||||
|
||||
`stop`
|
||||
```json
|
||||
{}
|
||||
```
|
||||
|
||||
## Client
|
||||
As component:
|
||||
- name: devClient
|
||||
- displayName: Dev Client
|
||||
- entry:
|
||||
- Try connect `ws://localhost:2333`
|
||||
- Debug toolbar (as widget)
|
||||
- options:
|
||||
- port: `2333`
|
||||
- updateMode: `reload` | `noReload` | `style`
|
||||
|
||||
### WebSocket
|
||||
Receive Messages:
|
||||
|
||||
- `start`
|
||||
- `coreUpdate`
|
||||
- `itemUpdate`
|
||||
- `stop`
|
||||
|
||||
### Debug toolbar
|
||||
- Updated ${num} features
|
||||
- Server connection status
|
||||
- Action: Disconnect / Reconnect
|
||||
- Support key bindings / LaunchBar actions
|
||||
Loading…
Reference in New Issue
Block a user