blob: e8064049fde9baed6be6fcda22ffb355074681bc [file] [log] [blame]
Philipp Schrader3de4dfc2023-02-15 20:18:25 -08001load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")
Austin Schuh76f227c2022-02-23 16:34:08 -08002load("//frc971/downloader:downloader.bzl", "aos_downloader_dir")
3
4filegroup(
5 name = "files",
6 srcs = glob([
7 "**/*.html",
8 "**/*.css",
James Kuszmaulf3ef9e12022-03-05 17:13:00 -08009 "**/*.png",
Austin Schuh76f227c2022-02-23 16:34:08 -080010 ]),
11 visibility = ["//visibility:public"],
12)
13
Philipp Schrader3de4dfc2023-02-15 20:18:25 -080014ts_project(
James Kuszmaulf3ef9e12022-03-05 17:13:00 -080015 name = "field_main",
16 srcs = [
17 "constants.ts",
18 "field_handler.ts",
19 "field_main.ts",
20 ],
21 target_compatible_with = ["@platforms//os:linux"],
22 deps = [
23 "//aos/network:connect_ts_fbs",
24 "//aos/network:web_proxy_ts_fbs",
25 "//aos/network/www:proxy",
James Kuszmaulb84c0912022-04-13 19:44:52 -070026 "//frc971/control_loops/drivetrain:drivetrain_status_ts_fbs",
James Kuszmaule3df1ed2023-02-20 16:21:17 -080027 "//frc971/control_loops/drivetrain/localization:localizer_output_ts_fbs",
James Kuszmaulf3ef9e12022-03-05 17:13:00 -080028 "//y2022/control_loops/superstructure:superstructure_status_ts_fbs",
James Kuszmauldac091f2022-03-22 09:35:06 -070029 "//y2022/localizer:localizer_status_ts_fbs",
James Kuszmaulf3ef9e12022-03-05 17:13:00 -080030 "//y2022/localizer:localizer_visualization_ts_fbs",
31 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
32 ],
33)
34
35rollup_bundle(
36 name = "field_main_bundle",
37 entry_point = "field_main.ts",
38 target_compatible_with = ["@platforms//os:linux"],
39 visibility = ["//y2022:__subpackages__"],
40 deps = [
41 ":field_main",
42 ],
43)
44
Austin Schuh76f227c2022-02-23 16:34:08 -080045aos_downloader_dir(
46 name = "www_files",
47 srcs = [
James Kuszmaul1b734232022-03-12 10:40:28 -080048 ":field_main_bundle.min.js",
Austin Schuh76f227c2022-02-23 16:34:08 -080049 ":files",
50 "//frc971/analysis:plot_index_bundle.min.js",
51 ],
52 dir = "www",
53 target_compatible_with = ["@platforms//os:linux"],
54 visibility = ["//visibility:public"],
55)