bdledger-apis/scripts/gen-node.js.sh
2020-03-14 21:48:59 +08:00

11 lines
734 B
Bash

#!/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