haveno-ts/bin/build_protobuf.sh
woodser f83fcb0d84
switch api to use typescript auto-generated from protobuf using grpc-web (#11)
haveno daemon can get payment accounts and the user's created offers
2021-09-14 08:27:45 -04:00

13 lines
518 B
Bash
Executable File

#!/bin/sh
// generate imports for haveno services and types using grpc-web
cd ./config || exit 1
protoc -I=./ *.proto --js_out=import_style=commonjs,binary:./ --grpc-web_out=import_style=typescript,mode=grpcwebtext:./ || exit 1
cd ../
// move imports to src folder
mv ./config/grpc_pb.d.ts ./src/protobuf || exit 1
mv ./config/grpc_pb.js ./src/protobuf || exit 1
mv ./config/pb_pb.d.ts ./src/protobuf || exit 1
mv ./config/pb_pb.js ./src/protobuf || exit 1
mv ./config/GrpcServiceClientPb.ts ./src/protobuf || exit 1