build: serve benchmark tree examples with bazel (#28568)

PR Close #28568
This commit is contained in:
Paul Gschwendtner
2019-02-06 18:02:07 +01:00
committed by Miško Hevery
parent fed8c1d160
commit c916b360bf
30 changed files with 386 additions and 189 deletions

View File

@ -1,4 +1,4 @@
package(default_visibility = ["//visibility:public"])
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
@ -6,11 +6,7 @@ load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
ng_module(
name = "tree_lib",
srcs = glob(
[
"**/*.ts",
],
),
srcs = glob(["**/*.ts"]),
tags = ["ivy-only"],
deps = [
"//modules/benchmarks/src/tree:util_lib",
@ -30,20 +26,12 @@ ng_rollup_bundle(
],
)
genrule(
name = "favicon",
srcs = ["//modules/benchmarks:favicon"],
outs = ["favicon.ico"],
cmd = "cp $< $@",
)
ts_devserver(
name = "devserver",
static_files = [
":bundle.min_debug.js",
":bundle.min.js",
"index.html",
":favicon",
],
tags = ["ivy-only"],
)

View File

@ -1,5 +1,9 @@
<!doctype html>
<html>
<head>
<!-- Prevent the browser from requesting any favicon. -->
<link rel="icon" href="data:,">
</head>
<body>
<h2>Params</h2>