Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 629 Bytes

README.md

File metadata and controls

45 lines (29 loc) · 629 Bytes

protoc

https://github.com/protocolbuffers/protobuf/releases/

文档

https://github.com/pseudomuto/protoc-gen-doc/releases

protoc --doc_out=./doc ./*.proto

JavaScript & TypeScript

安装

npm install -g protobufjs

构造 js 文件

pbjs -t json-module -w commonjs -o lebai.js ./*.proto

构造 ts 文件

pbjs -t static-module ./*.proto | pbts -o lebai.d.ts -

Python

安装

python -m pip install grpcio-tools

构造文件

python -m grpc_tools.protoc -I./ --python_out=./python --grpc_python_out=./python ./*.proto