Grpc, proto, protobufjs, devtools, chrome, extensions
grpc-protobufjs-devtools Extension
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}));
```
Source Manifest.json
Similar Extensions
RPC Network Inspector 450 3 ★ 104KiB
JSON-RPC Viewer 450 2 ★ 24.07KiB
MobX Developer Tools 450 51 ★ 682KiB
gRPC-Web Developer Tools 450 9 ★ 427KiB
Proto Decoder 450 2 ★ 3.82KiB
gRPC-Gateway Developer Tools 450 0 ★ 446KiB
pbkit-devtools 450 1 ★ 240KiB
JSON-handle 450 450 ★ 193KiB
gRPC-Web Developer Tools 450 5 ★ 446KiB
gRPC Web Devtools 450 5 ★ 999KiB
WebSocket Test Client 450 31 ★ 129KiB
grpc-web-devtools 450 3 ★ 1.13MiB
DA Network 450 1 ★ 898KiB
Smart Websocket Client 450 43 ★ 261KiB
Simple WebSocket Client 450 97 ★ 53.95KiB
Octotree - GitHub code tree 450 1139 ★ 3.54MiB
FeHelper(前端助手) 450 321 ★ 2.72MiB
稀土掘金 450 339 ★ 4.66MiB
Sourcegraph 450 169 ★ 8.22MiB
PostWoman Http Test 450 46 ★ 834KiB
Altair GraphQL Client 450 68 ★ 6.78MiB
WebSocket King Client 450 49 ★ 773KiB
GraphQL developer tools 450 24 ★ 98.19KiB
JSON RPC Chrome Viewer 450 14 ★ 122KiB