tree: 2afda9ef3b4c98cd4ed56472a0bcce64a7df9a43
  1. example/
  2. BUILD.bazel
  3. closure_proto_compile.bzl
  4. closure_proto_library.bzl
  5. defs.bzl
  6. deps.bzl
  7. README.md
closure/README.md

Closure rules

Rules for generating Closure protobuf .js files and libraries using standard Protocol Buffers. Libraries are created with closure_js_library from rules_closure

RuleDescription
closure_proto_compileGenerates Closure protobuf .js files
closure_proto_libraryGenerates a Closure library with compiled protobuf .js files using closure_js_library from rules_closure

closure_proto_compile

Generates Closure protobuf .js files

WORKSPACE

load("@rules_proto_grpc//closure:deps.bzl", "closure_deps")

closure_deps()

BUILD.bazel

load("@rules_proto_grpc//closure:defs.bzl", "closure_proto_compile")

closure_proto_compile(
    name = "person_closure_proto",
    deps = ["@rules_proto_grpc//example/proto:person_proto"],
)

Attributes

NameTypeMandatoryDefaultDescription
depslist<ProtoInfo>true[]List of labels that provide a ProtoInfo (such as native.proto_library)
verboseintfalse0The verbosity level. Supported values and results are 1: show command, 2: show command and sandbox after running protoc, 3: show command and sandbox before and after running protoc, 4. show env, command, expected outputs and sandbox before and after running protoc

closure_proto_library

Generates a Closure library with compiled protobuf .js files using closure_js_library from rules_closure

WORKSPACE

load("@rules_proto_grpc//closure:deps.bzl", "closure_deps")

closure_deps()

load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")

closure_repositories()

BUILD.bazel

load("@rules_proto_grpc//closure:defs.bzl", "closure_proto_library")

closure_proto_library(
    name = "person_closure_library",
    deps = ["@rules_proto_grpc//example/proto:person_proto"],
)

Attributes

NameTypeMandatoryDefaultDescription
depslist<ProtoInfo>true[]List of labels that provide a ProtoInfo (such as native.proto_library)
verboseintfalse0The verbosity level. Supported values and results are 1: show command, 2: show command and sandbox after running protoc, 3: show command and sandbox before and after running protoc, 4. show env, command, expected outputs and sandbox before and after running protoc