blob: f2df646801b9fdebffba3feabc4ba70008b2a993 [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 Line6571c02023-03-04 21:08:20 -080038 "//y2023/control_loops/superstructure:superstructure_status_ts_fbs",
James Kuszmaulfb894572023-02-23 17:25:06 -080039 "//y2023/localizer:status_ts_fbs",
40 "//y2023/localizer:visualization_ts_fbs",
Maxwell Hendersonad312342023-01-10 12:07:47 -080041 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
42 ],
43)
44
45rollup_bundle(
46 name = "field_main_bundle",
47 entry_point = "field_main.ts",
48 target_compatible_with = ["@platforms//os:linux"],
49 visibility = ["//y2023:__subpackages__"],
50 deps = [
51 ":field_main",
52 ],
53)
54
55aos_downloader_dir(
56 name = "www_files",
57 srcs = [
58 ":field_main_bundle.min.js",
59 ":files",
60 "//frc971/analysis:plot_index_bundle.min.js",
61 ],
62 dir = "www",
63 target_compatible_with = ["@platforms//os:linux"],
64 visibility = ["//visibility:public"],
65)