blob: 5dae3c68513ffcf50ca45b088277ebf2e0a98d77 [file] [log] [blame]
Maxwell Hendersonad312342023-01-10 12:07:47 -08001load("@npm//@bazel/typescript:index.bzl", "ts_library")
2load("//tools/build_rules:js.bzl", "rollup_bundle")
3load("//frc971/downloader:downloader.bzl", "aos_downloader_dir")
4
5filegroup(
6 name = "files",
7 srcs = glob([
8 "**/*.html",
9 "**/*.css",
10 "**/*.png",
11 ]),
12 visibility = ["//visibility:public"],
13)
14
15ts_library(
16 name = "field_main",
17 srcs = [
18 "constants.ts",
19 "field_handler.ts",
20 "field_main.ts",
21 ],
22 target_compatible_with = ["@platforms//os:linux"],
23 deps = [
24 "//aos/network:connect_ts_fbs",
25 "//aos/network:web_proxy_ts_fbs",
26 "//aos/network/www:proxy",
27 "//frc971/control_loops/drivetrain:drivetrain_status_ts_fbs",
28 "//y2023/control_loops/superstructure:superstructure_status_ts_fbs",
29 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
30 ],
31)
32
33rollup_bundle(
34 name = "field_main_bundle",
35 entry_point = "field_main.ts",
36 target_compatible_with = ["@platforms//os:linux"],
37 visibility = ["//y2023:__subpackages__"],
38 deps = [
39 ":field_main",
40 ],
41)
42
43aos_downloader_dir(
44 name = "www_files",
45 srcs = [
46 ":field_main_bundle.min.js",
47 ":files",
48 "//frc971/analysis:plot_index_bundle.min.js",
49 ],
50 dir = "www",
51 target_compatible_with = ["@platforms//os:linux"],
52 visibility = ["//visibility:public"],
53)