mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-04-24 15:19:17 -05:00
Add architecture overview to CONTRIBUTING.md
This commit is contained in:
parent
f8d251c8a1
commit
0d0cdfe068
|
|
@ -1,6 +1,59 @@
|
|||
Contributing to the PS client
|
||||
=============================
|
||||
|
||||
Architecture overview
|
||||
---------------------
|
||||
|
||||
This is an overview of what I want PS's architecture to look like when the Preact rewrite is finished. So far, it's just a work in progress.
|
||||
|
||||
PS loads itself in phases:
|
||||
|
||||
**Phase 1:** Background
|
||||
|
||||
- `client.css`
|
||||
- Basic styling
|
||||
- `client-core.ts`
|
||||
- Background model
|
||||
- Background view
|
||||
|
||||
**Phase 2:** Basic UI
|
||||
|
||||
- `font-awesome.css`
|
||||
- `client-main.ts`
|
||||
- Prefs model
|
||||
- Teams model
|
||||
- User model
|
||||
- Generic Room model
|
||||
- PS model
|
||||
- `client-frame.tsx`
|
||||
- Main view
|
||||
- Preact
|
||||
- SoundManager
|
||||
- `panel-mainmenu.tsx`
|
||||
- `panel-rooms.tsx`
|
||||
|
||||
**Phase 3:** Lightweight panels
|
||||
|
||||
- `panel-chat.tsx`
|
||||
- `panel-ladder.tsx`
|
||||
- `panel`
|
||||
|
||||
**Phase 4:** Heavyweight panels - loaded only when a user opens one
|
||||
|
||||
- `battle.css`
|
||||
- `sim-types.css`
|
||||
- `utilichart.css`
|
||||
- Data files
|
||||
- jQuery
|
||||
- `panel-battle.tsx`
|
||||
- `panel-teambuilder.tsx`
|
||||
- `battle-dex.ts`
|
||||
- `battle.ts`
|
||||
|
||||
Phase 4 doesn't load automatically, it'll only load when you start a battle or join a battle room or teambuilder.
|
||||
|
||||
Note that jQuery is only loaded in Phase 4. In earlier files, PS doesn't use jQuery. Just interact with the DOM directly, making sure you don't write any code that crashes IE9.
|
||||
|
||||
ES2018
|
||||
------
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user