grpc-protobufjs-devtools için öğe logo resmi

grpc-protobufjs-devtools

3,5(

2 puan

)
UzantıGeliştirici Araçları184 kullanıcı
grpc-protobufjs-devtools için 1 medya öğesi (ekran görüntüsü)

Genel bakış

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

Ayrıntılar

  • Sürüm
    0.0.3
  • Güncellenme tarihi:
    21 Haziran 2019
  • Sunan:
    ttshangxiang
  • Boyut
    301KiB
  • Diller
    中文(中国)
  • Tacir olmayan
    Bu yayıncı kendisini tacir olarak tanımlamamış. Avrupa Birliği'ndeki tüketiciler açısından bakıldığında, bu geliştiriciyle yapmış olduğunuz sözleşmelerde tüketici haklarının geçerli olmadığını lütfen unutmayın.

Gizlilik

Geliştirici, verilerinizin toplanması ve kullanılmasıyla ilgili herhangi bir bilgi sağlamadı.
Google uygulamaları