grpc-protobufjs-devtools
grpc, proto, protobufjs, devtools, chrome, extensions
Cos'è grpc-protobufjs-devtools?
grpc-protobufjs-devtools è un'estensione di Chrome sviluppata da ttshangxiang, e la sua funzione principale è "grpc, proto, protobufjs, devtools, chrome, extensions".
Screenshot dell'Estensione
Scarica il file CRX dell'estensione grpc-protobufjs-devtools
Scarica i file di estensione grpc-protobufjs-devtools in formato crx, installa manualmente le estensioni di Chrome nel browser o condividi i file crx con gli amici per installare facilmente le estensioni di Chrome.
Istruzioni per l'Uso dell'Estensione
### 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}));
``` Informazioni di Base sull'Estensione
| Nome | |
| ID | hlpccefinpildddaohjbonjdddnefnmg |
| URL Ufficiale | https://chromewebstore.google.com/detail/grpc-protobufjs-devtools/hlpccefinpildddaohjbonjdddnefnmg |
| Descrizione | grpc, proto, protobufjs, devtools, chrome, extensions |
| Dimensione del File | 301 KB |
| Conteggio Installazioni | 526 |
| Versione Corrente | 0.0.3 |
| Ultimo Aggiornamento | 2019-06-21 |
| Data di Pubblicazione | 2019-06-21 |
| Valutazione | 3.50/5 Totale 2 Valutazioni |
| Sviluppatore | ttshangxiang |
| Tipo di Pagamento | free |
| Lingue Supportate | 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
} | |