Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ send commands to a Meshtastic device lives here.

## Packages

All projects live under `packages/`.
Libraries live under `packages/`; the reference web client lives under `apps/`.

| Package | Purpose |
| --- | --- |
Expand Down Expand Up @@ -83,8 +83,12 @@ Expected domain errors are returned as `Result<T, E>` via [`better-result`](http

### Prerequisites

You need [pnpm](https://pnpm.io/) installed. If you plan to regenerate
protobufs, also install the [Buf CLI](https://buf.build/docs/cli/installation/).
- [pnpm](https://pnpm.io/) — package manager for the workspace.
- [Buf CLI](https://buf.build/docs/cli/installation/) — required whenever
`@meshtastic/protobufs` needs to build (which happens on a full
`pnpm -r build`, since it runs `buf generate`). If you only want to run
the web client in dev, `pnpm --filter meshtastic-web dev` does not need
Buf as long as the protobuf stubs are already generated.

### Setup

Expand All @@ -97,15 +101,32 @@ pnpm install
### Run the web client

```bash
pnpm --filter @meshtastic/web dev
pnpm --filter meshtastic-web dev
```

### Build everything

Requires the Buf CLI (see Prerequisites) — `@meshtastic/protobufs` runs
`buf generate` as part of its `build` script.

```bash
pnpm -r build
```

`pnpm -r` sorts packages by their `workspace:` dependencies (dependencies
before dependents) and runs up to `--workspace-concurrency` packages in
parallel. Packages linked over other protocols (for example `jsr:`) are
not sequenced against workspace peers, so run `pnpm --filter
@meshtastic/protobufs build` first if you are iterating on generated
stubs consumed via a non-workspace protocol.

If you only need the web client, build it and its dependency graph without
touching every publishable package:

```bash
pnpm --filter meshtastic-web... build
```

### Run tests

```bash
Expand Down
13 changes: 6 additions & 7 deletions apps/web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,31 +86,30 @@ instructions listed on the home page.

### Development

Install the dependencies.
Install the dependencies from the repo root (pnpm workspaces installs every package in one pass).

```bash
cd packages/web &&
pnpm install
```

Start the development server:
Start the development server for the web client:

```bash
pnpm run dev
pnpm --filter meshtastic-web dev
```

### Building and Packaging

Build the project:

```bash
pnpm run build
pnpm --filter meshtastic-web build
```

GZip the output:

```bash
pnpm run package
pnpm --filter meshtastic-web run package
```

### Why pnpm?
Expand Down Expand Up @@ -151,6 +150,6 @@ requests:
Meshtastic nodes.

Please review our
[Contribution Guidelines](https://github.com/meshtastic/web/blob/main/packages/web/CONTRIBUTING.md)
[Contribution Guidelines](https://github.com/meshtastic/web/blob/main/apps/web/CONTRIBUTING.md)
before submitting a pull request. We appreciate your help in making the project
better!
Loading