21 lines
1.1 KiB
Batchfile
21 lines
1.1 KiB
Batchfile
@echo off
|
|
cd /d "%~dp0.."
|
|
set dir=.\gen\nodejs
|
|
set exe=grpc_tools_node_protoc
|
|
set plugin=grpc_tools_node_protoc_plugin
|
|
|
|
where /q %exe% || echo missing %exe% && exit /B
|
|
where /q %plugin% || echo missing %plugin% && exit /B
|
|
|
|
for /f %%i in ('where %plugin%') do set pluginPath=%%i
|
|
|
|
if not exist %dir% mkdir %dir%
|
|
call %exe% -I . --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%pluginPath% bdledger/api/common.proto
|
|
call %exe% -I . --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%pluginPath% bdledger/api/error_details.proto
|
|
call %exe% -I . --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%pluginPath% bdledger/api/node.proto
|
|
call %exe% -I . --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%pluginPath% bdledger/api/ledger.proto
|
|
call %exe% -I . --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%pluginPath% bdledger/api/query.proto
|
|
call %exe% -I . --js_out=import_style=commonjs,binary:%dir% --grpc_out=%dir% --plugin=protoc-gen-grpc=%pluginPath% bdledger/api/contract.proto
|
|
|
|
echo all done
|