@grpc.ts/cli
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

A CLI to generate TypeScript typings from protobuf for gRPC.

This package is for supporting @grpc.ts packages.

Install

npm install --save-dev @grpc.ts/cli @grpc.ts/core

# or

yarn add -D @grpc.ts/cli @grpc.ts/core

# or

pnpm add -D @grpc.ts/cli @grpc.ts/core

Usage

  • Create config file grpc-cli.ts
import type { IConfigProps } from '@grpc.ts/cli';

const config: IConfigProps = {
  paths: ['../proto/*.proto'],
  external: ['google.protobuf'],
};

export default config;
  • Run script
pnpm gen-grpc-typing

Default output will be protobufTypings. Change output option to specify the folder you want to store the typing files.

TODO

[ ] Support generate typing as monorepo project

[ ] Rewrite the parser in Rust

Package Sidebar

Install

npm i @grpc.ts/cli

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

49.3 kB

Total Files

27

Last publish

Collaborators

  • zgid123