grpc-protobufjs-devtools
3,5(
2 puan
)UzantıGeliştirici Araçları184 kullanıcı
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})); ```
5 üzerinden 3,52 puan
Ayrıntılar
- Sürüm0.0.3
- Güncellenme tarihi:21 Haziran 2019
- Sunan:ttshangxiang
- Boyut301KiB
- Diller中文(中国)
- Tacir olmayanBu 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ı.