From 8d4bf386c219dd47920728f859d18924b89a1ba3 Mon Sep 17 00:00:00 2001 From: Richard Park Date: Sun, 12 May 2019 16:07:52 +0900 Subject: [PATCH] grpc-web is added --- third_party/protoc-gen-web.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 third_party/protoc-gen-web.sh diff --git a/third_party/protoc-gen-web.sh b/third_party/protoc-gen-web.sh new file mode 100755 index 0000000..fb0298b --- /dev/null +++ b/third_party/protoc-gen-web.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -eu + +PROTO_DIR="./api/proto/v1" +PKG_DIR="./pkg/api/v1" + +protoc \ + --proto_path=${PROTO_DIR} \ + --proto_path=third_party \ + --js_out=import_style=commonjs:${PKG_DIR} \ + --grpc-web_out=import_style=typescript,mode=grpcwebtext:${PKG_DIR} \ + -I ${PROTO_DIR} ${PROTO_DIR}/**/*.proto