Merge pull request #1422 from murgatroid99/grpc_tools_1.9.0_readme

Bump grpc-tools to 1.9.0 and add a README
This commit is contained in:
Michael Lumish 2020-05-21 11:10:49 -07:00 committed by GitHub
commit 075a75b015
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,22 @@
# grpc-tools
This package distributes the Protocol Buffers compiler `protoc` along with the
plugin for generating client and service objects for use with the Node gRPC
libraries.
## Usage
This library exports the `grpc_tools_node_protoc` executable, which accepts all
of the same arguments as `protoc` itself. For use with Node, you most likely
want to use CommonJS-style imports. An example of generating code this way can
be found in [this guide](https://developers.google.com/protocol-buffers/docs/reference/javascript-generated#commonjs-imports).
The `grpc_tools_node_protoc` automatically includes the Node gRPC plugin, so
it also accepts the `--grpc_out=[option:]path` argument. The option can be
one of the following:
- `grpc_js`: Generates code with `require('@grpc/grpc-js')` instead of
`require('grpc')`
- `generate_package_definition`: Generates code that does not `require` any
gRPC library, and instead generates `PackageDefinition` objects that can
be passed to the `loadPackageDefinition` function provided by both the
`grpc` and `@grpc/grpc-js` libraries.

View File

@ -1,6 +1,6 @@
{
"name": "grpc-tools",
"version": "1.8.1",
"version": "1.9.0",
"author": "Google Inc.",
"description": "Tools for developing with gRPC on Node.js",
"homepage": "https://grpc.io/",