Combine scouting webserver and scouting web pages

This patch adds a new `//scouting` target that runs the webserver and
points it at our web pages. This will be the target that folks can use
to run the entire scouting application.

Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I62acfb271b856f9d238b17ecc3573f31a07bab41
diff --git a/tools/build_rules/js.bzl b/tools/build_rules/js.bzl
index a014d13..be6826c 100644
--- a/tools/build_rules/js.bzl
+++ b/tools/build_rules/js.bzl
@@ -59,3 +59,22 @@
         "out": attr.output(mandatory = True),
     },
 )
+
+# Some rules (e.g. babel()) do not expose their files as runfiles. So we need
+# to do this step manually.
+def _turn_files_into_runfiles_impl(ctx):
+    files = ctx.attr.files.files
+    return [DefaultInfo(
+        files = files,
+        runfiles = ctx.runfiles(transitive_files = files),
+    )]
+
+turn_files_into_runfiles = rule(
+    implementation = _turn_files_into_runfiles_impl,
+    attrs = {
+        "files": attr.label(
+            mandatory = True,
+            doc = "The target whose files should be turned into runfiles.",
+        ),
+    },
+)