Skip to content

Commit 24f1a6f

Browse files
committed
refactor: use protobuf-es-lite
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent 8213698 commit 24f1a6f

File tree

15 files changed

+515
-739
lines changed

15 files changed

+515
-739
lines changed
File renamed without changes.

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ genproto: vendor node_modules $(GOIMPORTS) $(PROTOWRAP) $(PROTOC_GEN_GO) $(PROTO
8484
protogen() { \
8585
$(PROTOWRAP) \
8686
-I $${OUT} \
87-
--plugin=./node_modules/.bin/protoc-gen-es \
87+
--plugin=./node_modules/.bin/protoc-gen-es-lite \
8888
--plugin=./node_modules/.bin/protoc-gen-es-starpc \
8989
--go-lite_out=$${OUT} \
9090
--go-lite_opt=features=marshal+unmarshal+size+equal+json+clone \
9191
--go-starpc_out=$${OUT} \
92-
--es_out=$${OUT} \
93-
--es_opt target=ts \
94-
--es_opt ts_nocheck=false \
92+
--es-lite_out=$${OUT} \
93+
--es-lite_opt target=ts \
94+
--es-lite_opt ts_nocheck=false \
9595
--es-starpc_out=$${OUT} \
9696
--es-starpc_opt target=ts \
9797
--es-starpc_opt ts_nocheck=false \

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
## protobuf-project template
22

3-
This is a repository template for projects using protobuf.
3+
This template uses [protobuf-go-lite] to generate reflection-free Go code and [protobuf-es-lite] for TypeScript interfaces.
44

5-
Supports **Go and TypeScript** with Go-style import paths.
5+
[protobuf-go-lite]: https://github.com/aperturerobotics/protobuf-go-lite
6+
[protobuf-es-lite]: https://github.com/aperturerobotics/protobuf-es-lite
67

78
Uses a Makefile to download tools to ./hack/bin.
89

@@ -12,6 +13,10 @@ You can create a new repository with this template [on GitHub].
1213

1314
[on GitHub]: https://github.com/aperturerobotics/protobuf-project
1415

16+
Also check out the managed template at [template].
17+
18+
[template]: https://github.com/aperturerobotics/template
19+
1520
## Usage
1621

1722
Protobuf imports use Go paths and package names:
@@ -44,7 +49,7 @@ The Makefile will download the tools using Go to a bin dir.
4449

4550
The available make targets are:
4651

47-
- `gengo`: Generate protobuf files.
52+
- `genproto`: Generate protobuf files.
4853
- `test`: run go test -v ./...
4954
- `lint`: run golangci-lint on the project.
5055
- `fix`: run golangci-lint --fix on the project.
@@ -71,12 +76,6 @@ Other available branches:
7176
[starpc]: https://github.com/aperturerobotics/starpc
7277
[Twirp]: https://github.com/twitchtv/twirp
7378

74-
**starpc** is the only RPC library currently to support bidirectional RPC streams in the web browser over WebSocket or other two-way channels.
75-
76-
[protobuf-go-lite] is used with starpc to support reflection-free protobufs.
77-
78-
[protobuf-go-lite]: https://github.com/aperturerobotics/protobuf-go-lite
79-
8079
## Demo
8180

8281
**This branch implements a starpc service and demo.**

example/other/other.pb.go

Lines changed: 59 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)