Skip to content

Commit

Permalink
Compile protos with protobuf.js
Browse files Browse the repository at this point in the history
[Fixes #141]
  • Loading branch information
iredelmeier committed Dec 21, 2018
1 parent c09e90e commit 60c8aab
Show file tree
Hide file tree
Showing 21 changed files with 21,391 additions and 21,294 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ src/imp/platform/browser/thrift_api/crouton_types.js
src/imp/platform/node/generated/crouton_types.js
src/imp/platform/node/thrift_api/crouton_types.js
src/imp/platform/node/crouton_thrift.js
src/imp/generated_proto
src/imp/generated_proto.js
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

*Log of significant changes, especially those affecting the supported API.*

## Unreleased

* Switch protobuf compilers to [protobuf.js](https://github.com/dcodeIO/ProtoBuf.js/).

## 0.21.0

* Update `thrift` to `0.11.0`. This breaks support for node.js versions <= 5.8.
Expand Down
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ recursive_wildcard = $(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call recursi
# build
#
CMD_BABEL=node node_modules/.bin/babel
CMD_PROTO=node node_modules/.bin/pbjs
CMD_WEBPACK=node node_modules/.bin/webpack
SOURCES_JS=$(call recursive_wildcard,src/,*.js)
COMPILED_JS=$(SOURCES_JS:src/%.js=lib/%.js)
Expand Down Expand Up @@ -142,6 +143,9 @@ thrift-postprocess:
# LightStep internal target
.PHONY: proto
proto:
protoc -I"$(PWD)/../googleapis/:$(PWD)/../lightstep-tracer-common/" \
--js_out=import_style=commonjs,binary:src/imp/generated_proto \
collector.proto google/api/annotations.proto google/api/http.proto
$(CMD_PROTO) \
-p ../googleapis \
-p ../lightstep-tracer-common \
-t static-module \
--es6 \
../lightstep-tracer-common/collector.proto > src/imp/generated_proto.js
Loading

0 comments on commit 60c8aab

Please sign in to comment.