grpc-protobufjs-devtools의 상품 로고 이미지

grpc-protobufjs-devtools

3.5(

평점 2개

)
확장 프로그램개발자 도구226 사용자
grpc-protobufjs-devtools의 항목 미디어 1(스크린샷)

개요

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})); ```

세부정보

  • 버전
    0.0.3
  • 업데이트됨
    2019년 6월 21일
  • 제공
    ttshangxiang
  • 크기
    301KiB
  • 언어
    中文(中国)
  • 비판매자
    판매자로 식별되지 않은 개발자입니다. 유럽 연합에 거주하는 소비자의 경우, 이 개발자와 체결한 계약에 대해서는 소비자 권리가 적용되지 않을 수 있음을 유의해야 합니다.

개인정보 보호

개발자가 데이터 수집 또는 사용에 관한 정보를 제공하지 않았습니다.
Google 앱