Skip to content

Commit b662bfa

Browse files
devversionjelbourn
authored andcommitted
build: do not throw if example module is created through gulp (#13966)
* In case someone uses both Gulp and Bazel to build Angular Material, there will be an error because our gulp process generates the `example-module` as an actual source file. This is problematic because the `genrule` cannot have the `example-module` as an `input` and an `output` at the same time.
1 parent 057909d commit b662bfa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/material-examples/BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ ng_package(
3333

3434
genrule(
3535
name = "example-module",
36-
srcs = glob(["**/*.ts"]),
36+
# In case the example-module.ts file is present as an actual source file (e.g. generated
37+
# through Gulp), we need to exclude it because otherwise the genrule would fail.
38+
# TODO(devversion): remove this once gulp has been replaced with bazel.
39+
srcs = glob(["**/*.ts"], exclude = ["example-module.ts"]),
3740
outs = ["example-module.ts"],
3841
cmd = """
3942
# As a workaround for https://github.com/bazelbuild/rules_nodejs/issues/404, we pass the

0 commit comments

Comments
 (0)