Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 1 | load("//frc971/downloader:downloader.bzl", "aos_downloader_dir") |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 2 | load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project") |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 3 | |
| 4 | filegroup( |
| 5 | name = "files", |
| 6 | srcs = glob([ |
| 7 | "**/*.html", |
| 8 | "**/*.css", |
| 9 | "**/*.png", |
Maxwell Henderson | 4a18b19 | 2023-03-10 15:04:04 -0800 | [diff] [blame] | 10 | ]) + ["2023.png"], |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 11 | visibility = ["//visibility:public"], |
| 12 | ) |
| 13 | |
Maxwell Henderson | 4a18b19 | 2023-03-10 15:04:04 -0800 | [diff] [blame] | 14 | genrule( |
| 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 Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 21 | ts_project( |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 22 | 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 Kuszmaul | f7b5d62 | 2023-03-11 15:14:53 -0800 | [diff] [blame] | 31 | "//aos/network:message_bridge_client_ts_fbs", |
| 32 | "//aos/network:message_bridge_server_ts_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 33 | "//aos/network:web_proxy_ts_fbs", |
| 34 | "//aos/network/www:proxy", |
Milo Lin | 72fb901 | 2023-03-10 19:53:19 -0800 | [diff] [blame] | 35 | "//frc971/control_loops:control_loops_ts_fbs", |
Niko Sohmers | 76f4756 | 2023-12-20 20:59:06 -0800 | [diff] [blame] | 36 | "//frc971/control_loops/drivetrain:drivetrain_can_position_ts_fbs", |
| 37 | "//frc971/control_loops/drivetrain:drivetrain_position_ts_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 38 | "//frc971/control_loops/drivetrain:drivetrain_status_ts_fbs", |
James Kuszmaul | fb89457 | 2023-02-23 17:25:06 -0800 | [diff] [blame] | 39 | "//frc971/control_loops/drivetrain/localization:localizer_output_ts_fbs", |
Milo Lin | 1390657 | 2023-03-15 20:55:22 -0700 | [diff] [blame] | 40 | "//frc971/vision:target_map_ts_fbs", |
Milo Lin | e6571c0 | 2023-03-04 21:08:20 -0800 | [diff] [blame] | 41 | "//y2023/control_loops/superstructure:superstructure_status_ts_fbs", |
James Kuszmaul | fb89457 | 2023-02-23 17:25:06 -0800 | [diff] [blame] | 42 | "//y2023/localizer:status_ts_fbs", |
| 43 | "//y2023/localizer:visualization_ts_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 44 | "@com_github_google_flatbuffers//ts:flatbuffers_ts", |
| 45 | ], |
| 46 | ) |
| 47 | |
| 48 | rollup_bundle( |
| 49 | name = "field_main_bundle", |
| 50 | entry_point = "field_main.ts", |
| 51 | target_compatible_with = ["@platforms//os:linux"], |
| 52 | visibility = ["//y2023:__subpackages__"], |
| 53 | deps = [ |
| 54 | ":field_main", |
| 55 | ], |
| 56 | ) |
| 57 | |
| 58 | aos_downloader_dir( |
| 59 | name = "www_files", |
| 60 | srcs = [ |
| 61 | ":field_main_bundle.min.js", |
| 62 | ":files", |
| 63 | "//frc971/analysis:plot_index_bundle.min.js", |
| 64 | ], |
| 65 | dir = "www", |
| 66 | target_compatible_with = ["@platforms//os:linux"], |
| 67 | visibility = ["//visibility:public"], |
| 68 | ) |