grpc-protobufjs-devtools のアイテムロゴ画像

grpc-protobufjs-devtools

3.5(

2 件の評価

)
拡張機能デベロッパー ツール195 ユーザー
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
  • 言語
    中文(中国)
  • 非取引業者
    このデベロッパーは取引業者として申告していません。EU 加盟国の消費者とこのデベロッパーとの間に締結された契約には、消費者の権利が適用されません。

プライバシー

デベロッパーから、お客様のデータの収集または使用に関する情報は提供されていません。
Google アプリ