20 lines
467 B
Bash
Executable File
20 lines
467 B
Bash
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 |