2021-04-25 19:58:26 -04:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-09-15 08:06:50 -04:00
|
|
|
# generate imports for haveno services and types using grpc-web
|
2021-11-21 10:33:56 -05:00
|
|
|
mkdir -p ./src/protobuf
|
|
|
|
cd ./src/protobuf || exit 1
|
2022-02-11 18:13:56 -05:00
|
|
|
protoc -I=../../../haveno/proto/src/main/proto/ ../../../haveno/proto/src/main/proto/*.proto --js_out=import_style=commonjs,binary:./ --grpc-web_out=import_style=typescript,mode=grpcwebtext:./ || exit 1
|
2022-11-21 13:11:28 -05:00
|
|
|
|
|
|
|
# run typescript compiler
|
|
|
|
tsc
|
|
|
|
|
|
|
|
# copy protobuf models to dist
|
|
|
|
cp ./grpc_pb.d.ts ../../dist/protobuf/grpc_pb.d.ts || exit 1
|
|
|
|
cp ./grpc_pb.js ../../dist/protobuf/grpc_pb.js || exit 1
|
|
|
|
cp ./pb_pb.d.ts ../../dist/protobuf/pb_pb.d.ts || exit 1
|
|
|
|
cp ./pb_pb.js ../../dist/protobuf/pb_pb.js || exit 1
|