grpc protobufjs devtools in Chrome met OffiDocs
Ad
PRODUCTBESCHRIJVING
### gebruik 1, 使用node和protobufjs创建proto.
js。 ``` javascript const pbjs = require("protobufjs/cli/pbjs"); const fs = vereisen('fs'); const pad = vereisen('pad'); const glob = vereisen('glob'); const protoPath = 'src/proto/**/*.
proto'; // oorsprongpad const protos = glob.
synchroniseren(protoPath); pbj's.
main([ "--target", "json-module", "-w", "commonjs", .
.
.
protos], function(err, output) { if (err) throw err; // doelpad fs.
writeFileSync(pad.
solve(__mapnaam, '.
/src/xxx/proto.
js'), uitvoer); }); ``` 2, 挂载json字符串到window。 ``` javascript const $root = require('.
/src/xxx/proto.
js'); raam.
__DEVTOOLS_PROTO_JSON_STRING__ = JSON.
stringify($root.
toJSON({keepComments: true})); ```
Extra informatie:
- Aangeboden door ttshangxiang
- Gemiddelde beoordeling: 0 sterren (haatte het)
grpc protobufjs devtools web extension geïntegreerd met de OffiDocs Chromium online.