totopia-proto/third_party/protoc-gen-web.cmd
2019-07-03 00:28:46 +09:00

20 lines
467 B
Batchfile
Executable File

#!/usr/bin/env bash
# https://help.sonatype.com/repomanager3/formats/npm-registry
set -eu
PROTO_DIR="./api/proto/v1"
PKG_DIR="./pkg/api/v1/web"
rm -fR ${PKG_DIR}
mkdir -p ${PKG_DIR}
protoc \
--proto_path=${PROTO_DIR} \
--proto_path=third_party \
--js_out=import_style=commonjs:${PKG_DIR} \
--grpc-web_out=import_style=commonjs+dts,mode=grpcweb:${PKG_DIR} \
-I ${PROTO_DIR} ${PROTO_DIR}/**/*.proto
cp ./third_party/_package.json ${PKG_DIR}/package.json