grpc-protobufjs-devtools
3.5(
평점 2개
)확장 프로그램개발자 도구226 사용자
개요
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})); ```
5점 만점에 3.5점평점 2개
세부정보
- 버전0.0.3
- 업데이트됨2019년 6월 21일
- 제공ttshangxiang
- 크기301KiB
- 언어中文(中国)
- 비판매자판매자로 식별되지 않은 개발자입니다. 유럽 연합에 거주하는 소비자의 경우, 이 개발자와 체결한 계약에 대해서는 소비자 권리가 적용되지 않을 수 있음을 유의해야 합니다.
개인정보 보호
개발자가 데이터 수집 또는 사용에 관한 정보를 제공하지 않았습니다.