blob: c280e91d948d2c687d5ba60d6ad48fbe8c766c7d [file] [log] [blame]
Alex Perry5f474f22020-02-01 12:14:24 -08001load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
2load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle")
3
4ts_library(
5 name = "main",
6 srcs = [
Alex Perry5f474f22020-02-01 12:14:24 -08007 "image_handler.ts",
Austin Schuha4f69d62020-02-28 13:58:14 -08008 "main.ts",
Alex Perry5f474f22020-02-01 12:14:24 -08009 ],
Austin Schuha4f69d62020-02-28 13:58:14 -080010 visibility = ["//y2020:__subpackages__"],
Alex Perry5f474f22020-02-01 12:14:24 -080011 deps = [
12 "//aos/network/www:proxy",
13 "//y2020/vision:vision_ts_fbs",
Alex Perryd5e13572020-02-22 15:15:08 -080014 "//y2020/vision/sift:sift_ts_fbs",
Alex Perry5f474f22020-02-01 12:14:24 -080015 ],
Alex Perry5f474f22020-02-01 12:14:24 -080016)
17
18rollup_bundle(
19 name = "main_bundle",
20 entry_point = "y2020/www/main",
Austin Schuha4f69d62020-02-28 13:58:14 -080021 visibility = ["//y2020:__subpackages__"],
Alex Perry5f474f22020-02-01 12:14:24 -080022 deps = [
23 "main",
24 ],
Alex Perry5f474f22020-02-01 12:14:24 -080025)
26
27filegroup(
28 name = "files",
29 srcs = glob([
30 "**/*.html",
31 "**/*.css",
32 ]),
Austin Schuha4f69d62020-02-28 13:58:14 -080033 visibility = ["//visibility:public"],
Alex Perry5f474f22020-02-01 12:14:24 -080034)
35
36genrule(
37 name = "flatbuffers",
38 srcs = [
39 "@com_github_google_flatbuffers//:flatjs",
40 ],
41 outs = [
42 "flatbuffers.js",
43 ],
44 cmd = "cp $(location @com_github_google_flatbuffers//:flatjs) $@",
Austin Schuha4f69d62020-02-28 13:58:14 -080045 visibility = ["//y2020:__subpackages__"],
Alex Perry5f474f22020-02-01 12:14:24 -080046)