blob: 404247e214e2324303588c6853bd66215948be39 [file] [log] [blame]
Philipp Schrader3de4dfc2023-02-15 20:18:25 -08001load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")
Maxwell Hendersonad312342023-01-10 12:07:47 -08002load("//frc971/downloader:downloader.bzl", "aos_downloader_dir")
3
4filegroup(
5 name = "files",
6 srcs = glob([
7 "**/*.html",
8 "**/*.css",
9 "**/*.png",
Maxwell Henderson4a18b192023-03-10 15:04:04 -080010 ]) + ["2023.png"],
Maxwell Hendersonad312342023-01-10 12:07:47 -080011 visibility = ["//visibility:public"],
12)
13
Maxwell Henderson4a18b192023-03-10 15:04:04 -080014genrule(
15 name = "2023_field_png",
16 srcs = ["//third_party/y2023/field:pictures"],
17 outs = ["2023.png"],
18 cmd = "cp third_party/y2023/field/2023.png $@",
19)
20
Philipp Schrader3de4dfc2023-02-15 20:18:25 -080021ts_project(
Maxwell Hendersonad312342023-01-10 12:07:47 -080022 name = "field_main",
23 srcs = [
24 "constants.ts",
25 "field_handler.ts",
26 "field_main.ts",
27 ],
28 target_compatible_with = ["@platforms//os:linux"],
29 deps = [
30 "//aos/network:connect_ts_fbs",
James Kuszmaulf7b5d622023-03-11 15:14:53 -080031 "//aos/network:message_bridge_client_ts_fbs",
32 "//aos/network:message_bridge_server_ts_fbs",
Maxwell Hendersonad312342023-01-10 12:07:47 -080033 "//aos/network:web_proxy_ts_fbs",
34 "//aos/network/www:proxy",
Milo Lin72fb9012023-03-10 19:53:19 -080035 "//frc971/control_loops:control_loops_ts_fbs",
Maxwell Hendersonad312342023-01-10 12:07:47 -080036 "//frc971/control_loops/drivetrain:drivetrain_status_ts_fbs",
James Kuszmaulfb894572023-02-23 17:25:06 -080037 "//frc971/control_loops/drivetrain/localization:localizer_output_ts_fbs",
Milo Lin13906572023-03-15 20:55:22 -070038 "//frc971/vision:target_map_ts_fbs",
Milo Line6571c02023-03-04 21:08:20 -080039 "//y2023/control_loops/superstructure:superstructure_status_ts_fbs",
James Kuszmaulfb894572023-02-23 17:25:06 -080040 "//y2023/localizer:status_ts_fbs",
41 "//y2023/localizer:visualization_ts_fbs",
Maxwell Hendersonad312342023-01-10 12:07:47 -080042 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
43 ],
44)
45
46rollup_bundle(
47 name = "field_main_bundle",
48 entry_point = "field_main.ts",
49 target_compatible_with = ["@platforms//os:linux"],
50 visibility = ["//y2023:__subpackages__"],
51 deps = [
52 ":field_main",
53 ],
54)
55
56aos_downloader_dir(
57 name = "www_files",
58 srcs = [
59 ":field_main_bundle.min.js",
60 ":files",
61 "//frc971/analysis:plot_index_bundle.min.js",
62 ],
63 dir = "www",
64 target_compatible_with = ["@platforms//os:linux"],
65 visibility = ["//visibility:public"],
66)