Add a basic, empty spline UI based on Angular

The page doesn't do anything yet, but should let people build up a
more complex UI.

This is effectively a super stripped down version of the scouting app.

Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Ia97a3670439f4c3f208f8110282645aa0e3862f1
diff --git a/tools/build_rules/js.bzl b/tools/build_rules/js.bzl
index d7096a9..a95d5f2 100644
--- a/tools/build_rules/js.bzl
+++ b/tools/build_rules/js.bzl
@@ -84,8 +84,8 @@
       assets: assets to include in the file bundle
       visibility: visibility of the primary targets ({name}, 'test', 'serve')
     """
-    assets = assets if assets else native.glob(["assets/**/*"])
-    html_assets = html_assets if html_assets else []
+    assets = assets if assets != None else native.glob(["assets/**/*"])
+    html_assets = html_assets or []
 
     test_spec_srcs = native.glob(["app/**/*.spec.ts"])
 
diff --git a/tools/build_rules/js/static.bzl b/tools/build_rules/js/static.bzl
new file mode 100644
index 0000000..a2fe2ee
--- /dev/null
+++ b/tools/build_rules/js/static.bzl
@@ -0,0 +1,37 @@
+load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory_bin_action")
+
+def _assemble_static_files_impl(ctx):
+    out_dir = ctx.actions.declare_directory(ctx.label.name)
+
+    copy_to_directory_bin = ctx.toolchains["@aspect_bazel_lib//lib:copy_to_directory_toolchain_type"].copy_to_directory_info.bin
+
+    copy_to_directory_bin_action(
+        ctx,
+        dst = out_dir,
+        name = ctx.label.name,
+        copy_to_directory_bin = copy_to_directory_bin,
+        files = ctx.files.srcs + ctx.attr.app_files.files.to_list(),
+        replace_prefixes = ctx.attr.replace_prefixes,
+    )
+
+    return [DefaultInfo(
+        files = depset([out_dir]),
+        runfiles = ctx.runfiles([out_dir]),
+    )]
+
+assemble_static_files = rule(
+    implementation = _assemble_static_files_impl,
+    attrs = {
+        "app_files": attr.label(
+            mandatory = True,
+        ),
+        "srcs": attr.label_list(
+            mandatory = True,
+            allow_files = True,
+        ),
+        "replace_prefixes": attr.string_dict(
+            mandatory = True,
+        ),
+    },
+    toolchains = ["@aspect_bazel_lib//lib:copy_to_directory_toolchain_type"],
+)