bdledger-apis/scripts/gen-node.js.sh

11 lines
734 B
Bash
Raw Normal View History

2020-03-14 13:48:59 +00:00
#!/usr/bin/env bash
cd "${0%/*}/.."
dir=gen/nodejs
plugin=`which grpc_tools_node_protoc_plugin`
mkdir -p $dir
%exe% --js_out=import_style=commonjs,binary:%dir --grpc_out=%dir --plugin=protoc-gen-grpc=$plugin bdledger/api/common.proto
%exe% --js_out=import_style=commonjs,binary:%dir --grpc_out=%dir --plugin=protoc-gen-grpc=$plugin bdledger/api/error_details.proto
%exe% --js_out=import_style=commonjs,binary:%dir --grpc_out=%dir --plugin=protoc-gen-grpc=$plugin bdledger/api/node.proto
%exe% --js_out=import_style=commonjs,binary:%dir --grpc_out=%dir --plugin=protoc-gen-grpc=$plugin bdledger/api/ledger.proto
%exe% --js_out=import_style=commonjs,binary:%dir --grpc_out=%dir --plugin=protoc-gen-grpc=$plugin bdledger/api/query.proto