Skip to content

Commit

Permalink
Doc: clarify which packages are dev dependencies (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfiala authored Dec 2, 2024
1 parent 1bdaf96 commit 67ad733
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ The quickstart below shows a simple example of code generation for a `.proto` fi
npx tsc --init
```

2. Install the compiler [@bufbuild/buf], plugin, and runtime library:
2. Install the runtime library, code generator, and the [Buf CLI](https://buf.build/docs/ecosystem/cli-overview):

```shellsession
npm install --save-dev @bufbuild/buf @bufbuild/protoc-gen-es
npm install @bufbuild/protobuf
npm install --save-dev @bufbuild/buf @bufbuild/protoc-gen-es
```

3. Create a `buf.gen.yaml` file that looks like this:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ and then deserialized at its destination using the defined schema.

## Quickstart

1. Install the code generator, the runtime library, and the [Buf CLI](https://buf.build/docs/ecosystem/cli-overview):
1. Install the runtime library, code generator, and the [Buf CLI](https://buf.build/docs/ecosystem/cli-overview):

```shellsession
npm install @bufbuild/protobuf @bufbuild/protoc-gen-es @bufbuild/buf
npm install @bufbuild/protobuf
npm install --save-dev @bufbuild/protoc-gen-es @bufbuild/buf
```

2. Create a `buf.gen.yaml` file that looks like this:
Expand Down
8 changes: 2 additions & 6 deletions packages/protoc-gen-es/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,13 @@ The code generator plugin for Protocol Buffers for ECMAScript. Learn more about
schema. The generated code requires the runtime library [@bufbuild/protobuf](https://www.npmjs.com/package/@bufbuild/protobuf).
It's compatible with Protocol Buffer compilers like [buf](https://github.com/bufbuild/buf) and [protoc](https://github.com/protocolbuffers/protobuf/releases).

To install the plugin and the runtime library, run:
To install the runtime library and the plugin, run:

```shell
npm install --save-dev @bufbuild/protoc-gen-es
npm install @bufbuild/protobuf
npm install --save-dev @bufbuild/protoc-gen-es
```

We use peer dependencies to ensure that the code generator and runtime library are
compatible with each other. Note that npm installs them automatically, but Yarn
and pnpm do not.

## Generating code

### With buf
Expand Down

0 comments on commit 67ad733

Please sign in to comment.