Skip to content

Commit

Permalink
Merge pull request #50 from openhacku-team-a/shion/intro-protobuf-ts
Browse files Browse the repository at this point in the history
protobuf-tsを用いたPB生成に変更
  • Loading branch information
Shion1305 authored Mar 15, 2024
2 parents 9c5f83b + 71fa0fe commit e6b1095
Show file tree
Hide file tree
Showing 4 changed files with 903 additions and 60 deletions.
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@ gen_proto:
$(MAKE) gen_proto_ts
$(MAKE) gen_proto_go

gen_proto_win:
$(MAKE) gen_proto_ts_win
$(MAKE) gen_proto_go

gen_proto_go:
protoc --proto_path=./proto/src --go_out=./proto/golang/pb_out --go_opt=paths=source_relative --go-grpc_out=./proto/golang/pb_out --go-grpc_opt=paths=source_relative ./proto/src/*.proto

gen_proto_ts:
protoc --ts_proto_opt=nestJs=true --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./proto/typescript/pb_out --proto_path=./proto/src ./proto/src/*.proto

# Node file for ts proto generation exists on different path on Windows
gen_proto_ts_win:
protoc --ts_proto_opt=nestJs=true --plugin=./node_modules/.bin/protoc-gen-ts_proto.ps1 --ts_proto_out=./proto/typescript/pb_out --proto_path=./proto/src ./proto/src/*.proto
npx protoc --ts_out=./proto/typescript/pb_out --proto_path=./proto/src ./proto/src/*.proto
162 changes: 162 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"format": "prettier --write --ignore-path .prettierignore './**/*.{js,jsx,ts,tsx,json}'"
},
"dependencies": {
"@protobuf-ts/plugin": "^2.9.4",
"axios": "^1.6.7",
"firebase": "^10.8.1",
"next": "14.1.3",
"react": "^18",
Expand Down
Loading

0 comments on commit e6b1095

Please sign in to comment.