Skip to content

Commit

Permalink
doc: Document working with buf.yaml (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
custompro98 authored Jan 19, 2024
1 parent 578f3a0 commit 7a6a547
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,25 @@ Compile `.proto` files to plain TypeScript. Supports gRPC Node and gRPC Web.

## Usage

```properties
```sh
npm install -g protoc-gen-ts
```

### Protoc

```properties
protoc -I=sourcedir --ts_out=dist myproto.proto
```

### Buf
```yaml
version: v1
plugins:
- name: ts
path: ./node_modules/.bin/protoc-gen-ts
out: ./dist
```
### Example
```proto
Expand Down Expand Up @@ -78,4 +92,4 @@ If your corporate has a OSS funding scheme, please consider supporting us monthl

<a href="https://opencollective.com/protoc-gen-ts">
<img height="100px" src="https://opencollective.com/protoc-gen-ts/tiers/backer.svg?avatarHeight=36">
</a>
</a>

0 comments on commit 7a6a547

Please sign in to comment.