Skip to content

Instantly share code, notes, and snippets.

@TaQuanMinhLong
Created January 25, 2024 08:42
Show Gist options
  • Select an option

  • Save TaQuanMinhLong/115e571652fac08506c5afb91a34d9ec to your computer and use it in GitHub Desktop.

Select an option

Save TaQuanMinhLong/115e571652fac08506c5afb91a34d9ec to your computer and use it in GitHub Desktop.
# Setting proto build with ts-proto
# Proto dir: $PROJECT_ROOT/proto/your_proto_file.proto
protoc \
--plugin=./node_modules/.bin/protoc-gen-ts_proto \
--ts_proto_opt=esModuleInterop=true \
--ts_proto_opt=importSuffix=.js \
--ts_proto_opt=outputServices=grpc-js \
--ts_proto_opt=env=node \
--ts_proto_out=./packages/proto/src \
--ts_proto_opt=stringEnums=true \
--ts_proto_opt=removeEnumPrefix=true \
--ts_proto_opt=unrecognizedEnum=false \
--ts_proto_opt=useNumericEnumForJson=true \
--proto_path=. proto/*.proto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment