grpc-protobufjs-devtools
grpc, proto, protobufjs, devtools, chrome, extensions
什么是grpc-protobufjs-devtools?
grpc-protobufjs-devtools是由ttshangxiang开发的Chrome扩展程序,该扩展的主要功能是“grpc, proto, protobufjs, devtools, chrome, extensions”。
扩展截图
下载grpc-protobufjs-devtools扩展crx文件
下载grpc-protobufjs-devtools扩展crx格式的文件,手动将Chrome插件安装到浏览器中,也可以将crx文件分享给朋友,轻松安装Chrome插件。
扩展使用说明
### 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}));
``` 扩展基本信息
| 名称 | |
| ID | hlpccefinpildddaohjbonjdddnefnmg |
| 官方URL | https://chromewebstore.google.com/detail/grpc-protobufjs-devtools/hlpccefinpildddaohjbonjdddnefnmg |
| 简介 | grpc, proto, protobufjs, devtools, chrome, extensions |
| 文件大小 | 301 KB |
| 安装次数 | 526 |
| 当前版本 | 0.0.3 |
| 更新时间 | 2019-06-21 |
| 上架时间 | 2019-06-21 |
| 评分 | 3.50/5 共2次评分 |
| 开发者 | ttshangxiang |
| 付费类型 | free |
| 支持的语言 | zh-CN |
| manifest.json | |
{
"update_url": "https:\/\/clients2.google.com\/service\/update2\/crx",
"name": "grpc-protobufjs-devtools",
"version": "0.0.3",
"description": "grpc, proto, protobufjs, devtools, chrome, extensions",
"background": {
"scripts": [
"background.js"
],
"persistent": false
},
"devtools_page": "devtools.html",
"icons": {
"16": "images\/get_started16.png",
"32": "images\/get_started32.png",
"48": "images\/get_started48.png",
"128": "images\/get_started128.png"
},
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self';",
"manifest_version": 2
} | |