File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " grpc-tools" ,
3
- "version" : " 1.8.1 " ,
3
+ "version" : " 1.9.0 " ,
4
4
"author" : " Google Inc." ,
5
5
"description" : " Tools for developing with gRPC on Node.js" ,
6
6
"homepage" : " https://grpc.io/" ,
You can’t perform that action at this time.
0 commit comments