Skip to content

Instantly share code, notes, and snippets.

@SeanChristopherConway
Created November 11, 2020 02:14
Show Gist options
  • Save SeanChristopherConway/91add690f9f38784ce56abd20aaf43d6 to your computer and use it in GitHub Desktop.
Save SeanChristopherConway/91add690f9f38784ce56abd20aaf43d6 to your computer and use it in GitHub Desktop.
Makefile for protoc protobuf creation for both improbable grpc-web js and a golang service
compile:
protoc --proto_path=api/protobuf api/protobuf/*.proto --go-grpc_out=internal/pb --go_out=internal/pb
compile_web:
protoc \
--plugin=protoc-gen-ts=api/protobuf/js/node_modules/.bin/protoc-gen-ts \
--proto_path=api/protobuf api/protobuf/*.proto \
--js_out=import_style=commonjs,binary:internal/pb/js \
--ts_out="service=grpc-web:internal/pb/js"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment