JSPM

  • Created
  • Published
  • Downloads 267300
  • Score
    100M100P100Q173312F
  • License Apache-2.0

The protocol buffer compiler plugin "protobuf-ts" generates TypeScript, gRPC-web, Twirp, and more.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@protobuf-ts/plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @protobuf-ts/plugin

    The protocol buffer compiler plugin for TypeScript: protobuf-ts

    Installation:

    # with npm:
    npm install -D @protobuf-ts/plugin
    
    # with yarn:
    yarn add --dev @protobuf-ts/plugin

    This will install the plugin as a development dependency.

    Basic usage:

    npx protoc --ts_out . --proto_path protos protos/my.proto 

    With some options:

    npx protoc \ 
      --ts_out . \
      --ts_opt long_type_string \
      --ts_opt optimize_code_size \
      --proto_path protos \
      protos/my.proto 

    protoc is the protocol buffer compiler. protobuf-ts installs it automatically.

    Plugin parameters are documented in the MANUAL.
    For a quick overview of protobuf-ts, check the repository README.