+
Skip to content

question: config support for protoc's plugin cli parameter? #132

@vishen

Description

@vishen

When generating grpc for Nodejs, the documentation for grpc says to do the following:

grpc_tools_node_protoc --js_out=import_style=commonjs,binary:. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` helloworld.proto

note the --plugin=<generator_name>=<binary_location_on_disk>

This is currently possible in Gunk by doing the following:

# .gunkconfig

[generate js]
import_type=commonjs
binary

[generate]
command=/path/to/protoc-gen-grpc

but it isn't possible to do this if doing a shortened generate section; should we make it possible? we could do similar to the following:

# .gunkconfig

[generate js]
import_type=commonjs
binary

[generate grpc]
plugin=/path/to/protoc-gen-grpc

I am not sure if this is something we want, but if we wanted to keep it similar to protoc cli then it is pretty trivial to add something like this in?

/cc @mvdan @kenshaw

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载