0

I have a folder protobuf with a lot of .proto files which I can compile with

protoc -I=protobuf filename.proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:output

This generates the grpc_web_pb.js into the /output folder but I'm looking for a way to not have to call protoc for every single file, is there something like a wildcard?

I tried

protoc -I=protobuf *.proto --grpc-web_out=import_style=commonjs,mode=grpcwebtext:output

but that doesn't work, fails with no matches found: *.proto

po.pe
  • 1,047
  • 1
  • 12
  • 27
  • Wildcards are supported. I think your path is incorrect (in other words, the compiler can't find a proto file in the directory it's looking in). – Berco Beute Mar 25 '20 at 22:18

1 Answers1

0

This works for me, maybe just add path to your .proto file:

protoc -I . --grpc-web_out=import_style=commonjs,mode=grpcwebtext:. ./*.proto
dmaixner
  • 808
  • 1
  • 7
  • 16