Skip to content

Commit

Permalink
Adds tags to web_resources_devserver().
Browse files Browse the repository at this point in the history
This propagates the `tags` attribute to the underlying implementation. I initially tried to default `tags` to `None`, however this breaks `concatjs_devserver()`, which seems to expect to always receive a list. Instead, we have to default to `[]`.
  • Loading branch information
dgp1130 committed Jun 26, 2021
1 parent 919e223 commit 11f6e92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/rules_prerender/web_resources_devserver.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def web_resources_devserver(
resources,
testonly = None,
visibility = None,
tags = [],
):
"""Generates a devserver which serves the provided `web_resources()` target.
Expand All @@ -20,6 +21,7 @@ def web_resources_devserver(
resources: The `web_resources()` target to serve.
testonly: See https://docs.bazel.build/versions/master/be/common-definitions.html.
visibility: See https://docs.bazel.build/versions/master/be/common-definitions.html.
tags: See https://docs.bazel.build/versions/master/be/common-definitions.html.
"""
# Generate a devserver implementation.
concatjs_devserver(
Expand All @@ -28,4 +30,5 @@ def web_resources_devserver(
additional_root_paths = [file_path_of(absolute(resources))],
testonly = testonly,
visibility = visibility,
tags = tags,
)

0 comments on commit 11f6e92

Please sign in to comment.