grpc-protobufjs-devtools
Item logo image for grpc-protobufjs-devtools

grpc-protobufjs-devtools

3.5(

2 ratings

)
ExtensionDeveloper Tools499 users
Item media 1 screenshot

Overview

grpc, proto, protobufjs, devtools, chrome, extensions

### use 1, 使用node和protobufjs创建proto.js。 ``` javascript const pbjs = require("protobufjs/cli/pbjs"); const fs = require('fs'); const path = require('path'); const glob = require('glob'); const protoPath = 'src/proto/**/*.proto'; // origin path const protos = glob.sync(protoPath); pbjs.main([ "--target", "json-module", "-w", "commonjs", ...protos], function(err, output) { if (err) throw err; // target path fs.writeFileSync(path.resolve(__dirname, './src/xxx/proto.js'), output); }); ``` 2, 挂载json字符串到window。 ``` javascript const $root = require('./src/xxx/proto.js'); window.__DEVTOOLS_PROTO_JSON_STRING__ = JSON.stringify($root.toJSON({keepComments: true})); ```

3.5 out of 52 ratings

Google doesn't verify reviews. Learn more about results and reviews.

Review's profile picture

sergio bergauerNov 1, 2023

I cannot get the response Body decoded

1 person found this review to be unhelpful

Details

  • Version
    0.0.3
  • Updated
    June 21, 2019
  • Offered by
    ttshangxiang
  • Size
    301KiB
  • Languages
    中文 (简体)
  • Non-trader
    This developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.

Privacy

The developer has not provided any information about the collection or usage of your data.
Google apps