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 b96fd250d71..877a0852058 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 bcc454ac4b8..024754cb607 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 3fe2fc8acc9..e53583a85d1 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 65947a089e9..d9b6385cd32 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 e2f428ffe8f..aaba2012563 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 ef9365420f5..da9d9396f24 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,