zv-grpc-web-build

CLI protoc wrapper for gRPC Web client generation


Keywords
gRPC-Web, protoc, protobuf, gRPC, TypeScript, JavaScript
License
ISC
Install
npm install zv-grpc-web-build@1.0.0

Documentation

ZV gRPC Web Build

This project implements an NPM CLI wrapper tool for protoc. It can be used to generate TypeScript gRPC Web clients using NPM run scripts.

Requirements

This package requires both the protoc binary and the protoc-gen-grpc-web plugin to be installed.

See:

Usage

$ zv-grpc-web-build

Options:
  --version     Show version number                                    [boolean]
  -d, --dir     Source directory                             [string] [required]
  -o, --out     Output directory                             [string] [required]
  -e, --ext     Proto file extensions              [array] [default: [".proto"]]
  -b, --binary  Binary protocol ("grpcweb" instead of "grpcwebtext")
                                                      [boolean] [default: false]
  -h, --help    Show help                                              [boolean]

Features

  • Pure NodeJS wrapper script (works on all platforms supporting NodeJS and protoc)
  • Searches source directory recursively for proto files
  • Generates TypeScript gRPC Web clients using protoc
  • Appends /* eslint-disable */ to the beginning of JS files

Use case

This script is intended to be used in NPM run scripts.