Proposal: Optional Generated File Suffix #383
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
ts-proto is great and we've been using it for a while in production. However, having the generated typescript files matching the name of the protobuf file with just the
.ts
extension is increasingly becoming a maintenance problem. For instance, there is no convenient way to gitignore these generated file with a glob if they are adjacent to non-generated sources.Other widely used protoc plugins seem introduce suffixes as a matter of convention. For a
helloworld.proto
helloworld.pb.go
helloworld_pb.js
helloworld_pb2.py
etc
Unless there is already a mechanism for appending proto suffixes to the generated TS files which are also correctly used in the imports, we'd like to see a mechanism like
--ts_proto_opt=suffix=_pb
which would producehelloworld_pb.ts
. Since it can default to empty, it should be backwards compatible.Hopefully with a little direction, we'd be willing to work on a PR to introduce this functionality.
The text was updated successfully, but these errors were encountered: