bdledger-apis/scripts/gen-nodejs.bat

17 lines
910 B
Batchfile
Raw Normal View History

2020-03-14 13:48:59 +00:00
@echo off
cd /d "%~dp0.."
set dir=.\gen\nodejs
set exe=grpc_tools_node_protoc
for /f %%i in ('where grpc_tools_node_protoc_plugin') do set plugin=%%i
where /q %exe% || echo missing %exe% && exit /B
if not exist %dir% mkdir %dir%
call %exe% --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%plugin% bdledger/api/common.proto
call %exe% --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%plugin% bdledger/api/error_details.proto
call %exe% --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%plugin% bdledger/api/node.proto
call %exe% --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%plugin% bdledger/api/ledger.proto
call %exe% --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%plugin% bdledger/api/query.proto
echo all done