@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