Skip to content

Commit 075a75b

Browse files
authored
Merge pull request #1422 from murgatroid99/grpc_tools_1.9.0_readme
Bump grpc-tools to 1.9.0 and add a README
2 parents ea77768 + dfacfae commit 075a75b

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

packages/grpc-tools/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# grpc-tools
2+
3+
This package distributes the Protocol Buffers compiler `protoc` along with the
4+
plugin for generating client and service objects for use with the Node gRPC
5+
libraries.
6+
7+
## Usage
8+
9+
This library exports the `grpc_tools_node_protoc` executable, which accepts all
10+
of the same arguments as `protoc` itself. For use with Node, you most likely
11+
want to use CommonJS-style imports. An example of generating code this way can
12+
be found in [this guide](https://developers.google.com/protocol-buffers/docs/reference/javascript-generated#commonjs-imports).
13+
The `grpc_tools_node_protoc` automatically includes the Node gRPC plugin, so
14+
it also accepts the `--grpc_out=[option:]path` argument. The option can be
15+
one of the following:
16+
17+
- `grpc_js`: Generates code with `require('@grpc/grpc-js')` instead of
18+
`require('grpc')`
19+
- `generate_package_definition`: Generates code that does not `require` any
20+
gRPC library, and instead generates `PackageDefinition` objects that can
21+
be passed to the `loadPackageDefinition` function provided by both the
22+
`grpc` and `@grpc/grpc-js` libraries.

packages/grpc-tools/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "grpc-tools",
3-
"version": "1.8.1",
3+
"version": "1.9.0",
44
"author": "Google Inc.",
55
"description": "Tools for developing with gRPC on Node.js",
66
"homepage": "https://grpc.io/",

0 commit comments

Comments
 (0)