updated docs
This commit is contained in:
54
docs/data/en/components.md
Normal file
54
docs/data/en/components.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Shared Components
|
||||
|
||||
Soleprint has two distributable components. They live inside the spr repo and get published into consuming projects.
|
||||
|
||||
Management is handled by `ctrl/spr.py`.
|
||||
|
||||
## soleprint-ui
|
||||
|
||||
Vue component library. Includes GraphRenderer, sidebar components, and shared UI pieces.
|
||||
|
||||
Source: `soleprint/common/ui/`
|
||||
|
||||
Publish to a consuming project:
|
||||
|
||||
```bash
|
||||
python ctrl/spr.py publish soleprint-ui <target>
|
||||
```
|
||||
|
||||
The target project receives the built files and commits them directly. No npm dependency on spr.
|
||||
|
||||
## soleprint-modelgen
|
||||
|
||||
Model generator. Reads schema definitions and produces model files.
|
||||
|
||||
Source: `soleprint/station/tools/modelgen/`
|
||||
|
||||
Has a `pyproject.toml` for local editable install:
|
||||
|
||||
```bash
|
||||
pip install -e soleprint/station/tools/modelgen/
|
||||
```
|
||||
|
||||
## Registry
|
||||
|
||||
`registry.json` at the repo root defines all components. Each entry has:
|
||||
|
||||
- **name** — component identifier
|
||||
- **type** — `npm` or `python`
|
||||
- **source** — path within the repo
|
||||
- **version** — current version string
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
python ctrl/spr.py list # Show all components
|
||||
python ctrl/spr.py sync <component> <target> # One-time copy
|
||||
python ctrl/spr.py watch <component> <target> # Live sync (ctrl+c to stop)
|
||||
python ctrl/spr.py publish <component> <target> # Versioned publish
|
||||
python ctrl/spr.py diff <component> <target> # Show differences
|
||||
```
|
||||
|
||||
`sync` copies files once. `watch` keeps them in sync while you develop. `publish` stamps a version and copies.
|
||||
|
||||
The consuming project has no awareness of spr. It just commits whatever lands in the target folder.
|
||||
Reference in New Issue
Block a user