From 0f839bcfd04dc34f0feddfe48ea23487a784a85b Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Wed, 6 Feb 2019 14:22:01 +0100 Subject: [PATCH] build: playground examples do not explicitly specify "ng_module" assets (#28562) Currently all playground examples are built with NGC, and most of the HTML resources are automatically inlined. Surprisingly NGC is able to resolve the relative component assets even though these aren't specified in the `assets`. This seems to work because NGC resolves the files in the execroot where the files are present (if Bazel doesn't use sandboxing). Issue is tracked with TOOL-667 PR Close #28562 --- modules/playground/src/gestures/BUILD.bazel | 1 + modules/playground/src/todo/BUILD.bazel | 1 + modules/playground/src/web_workers/images/BUILD.bazel | 1 + modules/playground/src/web_workers/router/BUILD.bazel | 1 + modules/playground/src/web_workers/todo/BUILD.bazel | 1 + modules/playground/src/zippy_component/BUILD.bazel | 2 +- 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/playground/src/gestures/BUILD.bazel b/modules/playground/src/gestures/BUILD.bazel index b96fd250d7..877a085205 100644 --- a/modules/playground/src/gestures/BUILD.bazel +++ b/modules/playground/src/gestures/BUILD.bazel @@ -6,6 +6,7 @@ package(default_visibility = ["//modules/playground:__subpackages__"]) ng_module( name = "gestures", srcs = glob(["**/*.ts"]), + assets = ["template.html"], tsconfig = "//modules/playground:tsconfig-build.json", # TODO: FW-1004 Type checking is currently not complete. type_check = False, diff --git a/modules/playground/src/todo/BUILD.bazel b/modules/playground/src/todo/BUILD.bazel index bcc454ac4b..024754cb60 100644 --- a/modules/playground/src/todo/BUILD.bazel +++ b/modules/playground/src/todo/BUILD.bazel @@ -6,6 +6,7 @@ package(default_visibility = ["//modules/playground:__subpackages__"]) ng_module( name = "todo", srcs = glob(["**/*.ts"]), + assets = ["todo.html"], tsconfig = "//modules/playground:tsconfig-build.json", # TODO: FW-1004 Type checking is currently not complete. type_check = False, diff --git a/modules/playground/src/web_workers/images/BUILD.bazel b/modules/playground/src/web_workers/images/BUILD.bazel index 3fe2fc8acc..e53583a85d 100644 --- a/modules/playground/src/web_workers/images/BUILD.bazel +++ b/modules/playground/src/web_workers/images/BUILD.bazel @@ -6,6 +6,7 @@ package(default_visibility = ["//modules/playground:__subpackages__"]) ng_module( name = "images", srcs = glob(["**/*.ts"]), + assets = ["image_demo.html"], tsconfig = "//modules/playground:tsconfig-build.json", # TODO: FW-1004 Type checking is currently not complete. type_check = False, diff --git a/modules/playground/src/web_workers/router/BUILD.bazel b/modules/playground/src/web_workers/router/BUILD.bazel index 65947a089e..d9b6385cd3 100644 --- a/modules/playground/src/web_workers/router/BUILD.bazel +++ b/modules/playground/src/web_workers/router/BUILD.bazel @@ -6,6 +6,7 @@ package(default_visibility = ["//modules/playground:__subpackages__"]) ng_module( name = "router", srcs = glob(["**/*.ts"]), + assets = ["app.html"], tsconfig = "//modules/playground:tsconfig-build.json", # TODO: FW-1004 Type checking is currently not complete. type_check = False, diff --git a/modules/playground/src/web_workers/todo/BUILD.bazel b/modules/playground/src/web_workers/todo/BUILD.bazel index e2f428ffe8..aaba201256 100644 --- a/modules/playground/src/web_workers/todo/BUILD.bazel +++ b/modules/playground/src/web_workers/todo/BUILD.bazel @@ -6,6 +6,7 @@ package(default_visibility = ["//modules/playground:__subpackages__"]) ng_module( name = "todo", srcs = glob(["**/*.ts"]), + assets = ["todo.html"], tsconfig = "//modules/playground:tsconfig-build.json", # TODO: FW-1004 Type checking is currently not complete. type_check = False, diff --git a/modules/playground/src/zippy_component/BUILD.bazel b/modules/playground/src/zippy_component/BUILD.bazel index ef9365420f..da9d9396f2 100644 --- a/modules/playground/src/zippy_component/BUILD.bazel +++ b/modules/playground/src/zippy_component/BUILD.bazel @@ -6,7 +6,7 @@ package(default_visibility = ["//modules/playground:__subpackages__"]) ng_module( name = "zippy_component", srcs = glob(["**/*.ts"]), - assets = glob(["**/*.html"]), + assets = glob(["app/zippy.html"]), tsconfig = "//modules/playground:tsconfig-build.json", # TODO: FW-1004 Type checking is currently not complete. type_check = False,