protoc-build
v1.0.8
Published
proto文件编译成js
Downloads
2
Readme
protoc-build
proto文件编译成js
Installation
Node.js
npm install protoc-build
Usage
1、exec protoc command generate
import protocBuild from 'protoc-build';
protocBuild(`protoc -I=${dir} ${fileName} --js_out=import_style=commonjs:${dir} --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:${dir}`)
2、exec generate
import { genProto } from 'protoc-build';
genProto(`${dir}/**`)