You've already forked tribes-plugin-trust
40310b26ea
CI / Test (push) Failing after 20s
Introduce the Trust plugin as the federation provider for tribe identity and hello handshakes, with synced Ash resources for remote tribes and tribe relationships plus an admin LiveView for trust management.
56 lines
1.3 KiB
Markdown
56 lines
1.3 KiB
Markdown
# Development
|
|
|
|
## Local Setup
|
|
|
|
This plugin expects a sibling Tribes checkout at `../tribes`.
|
|
|
|
```bash
|
|
mix deps.get
|
|
devenv shell -- plugin test
|
|
```
|
|
|
|
To load the plugin in the host during development:
|
|
|
|
```bash
|
|
cd ../tribes
|
|
ln -s ../tribes-plugin-trust plugins/trust
|
|
iex --sname dev -S mix phx.server
|
|
```
|
|
|
|
Set `TRIBES_HOST_ROOT=/path/to/tribes` if your host checkout is not a sibling.
|
|
|
|
## Command Wrapper
|
|
|
|
Use `scripts/plugin` for host-aware workflows:
|
|
|
|
```bash
|
|
scripts/plugin validate
|
|
scripts/plugin test
|
|
scripts/plugin precommit
|
|
scripts/plugin ash.codegen update_example_resources
|
|
scripts/plugin ecto.migration add_example_table
|
|
scripts/plugin smoke
|
|
```
|
|
|
|
Inside the plugin devenv shell, the `plugin` command is available and forwards
|
|
through the same wrapper.
|
|
|
|
Prefer `plugin test` over raw `mix test` for host-backed plugin suites. The
|
|
wrapper runs Mix with the host database/services and points the host plugin
|
|
manager at the host manifest plus built-in providers such as `tribes_ui`. Use
|
|
`mix raw_test` / `mix raw_precommit` only for deliberate low-level debugging.
|
|
|
|
## Assets
|
|
|
|
Browser code lives in `assets/ts` and is compiled to `priv/static`:
|
|
|
|
```bash
|
|
devenv shell -- npm run build --prefix assets
|
|
```
|
|
|
|
Use the wrapper form for installs too:
|
|
|
|
```bash
|
|
devenv shell -- npm install --prefix assets
|
|
```
|