…
|
||
---|---|---|
.. | ||
scripts | ||
README.md | ||
lighthouse-result.proto | ||
sample_v2_round_trip.json |
README.md
How to compile protos + use locally
- Install the proto compiler
- Manual install
- Get the latest proto release (select one with python included if you want to run this validator)
- Install the C++ Protocol Buffer Runtime
- Brew install
brew install protobuf
- Manual install
- Run
yarn compile-proto
thenyarn build-proto-roundtrip
Proto Resources
LHR Round Trip Flow
LHR round trip flow:
(Compiling the Proto)
lighthouse_result.proto -> protoc --python_out ... -> lighthouse_result.pb2
⭏
(used by)
(Making a Round Trip JSON) ⭏
lhr.json --> proto_preprocessor.js -> lhr_processed.json -> json_roundtrip_via_proto.py -> lhr.round_trip.json
Hacking Hints
- Clean out compiled proto and json with
yarn clean
- Round trips might jumble the order of your JSON keys and lists!
- Is your
six
installation troubling yourpip install protobuf
? Mine did. Trypip install --ignore-installed six
.