Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 1 | load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project") |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 2 | load("//frc971/downloader:downloader.bzl", "aos_downloader_dir") |
| 3 | |
| 4 | filegroup( |
| 5 | name = "files", |
| 6 | srcs = glob([ |
| 7 | "**/*.html", |
| 8 | "**/*.css", |
| 9 | "**/*.png", |
| 10 | ]), |
| 11 | visibility = ["//visibility:public"], |
| 12 | ) |
| 13 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 14 | ts_project( |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 15 | 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", |
Milo Lin | 72fb901 | 2023-03-10 19:53:19 -0800 | [diff] [blame^] | 26 | "//frc971/control_loops:control_loops_ts_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 27 | "//frc971/control_loops/drivetrain:drivetrain_status_ts_fbs", |
James Kuszmaul | fb89457 | 2023-02-23 17:25:06 -0800 | [diff] [blame] | 28 | "//frc971/control_loops/drivetrain/localization:localizer_output_ts_fbs", |
Milo Lin | e6571c0 | 2023-03-04 21:08:20 -0800 | [diff] [blame] | 29 | "//y2023/control_loops/superstructure:superstructure_status_ts_fbs", |
James Kuszmaul | fb89457 | 2023-02-23 17:25:06 -0800 | [diff] [blame] | 30 | "//y2023/localizer:status_ts_fbs", |
| 31 | "//y2023/localizer:visualization_ts_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 32 | "@com_github_google_flatbuffers//ts:flatbuffers_ts", |
| 33 | ], |
| 34 | ) |
| 35 | |
| 36 | rollup_bundle( |
| 37 | name = "field_main_bundle", |
| 38 | entry_point = "field_main.ts", |
| 39 | target_compatible_with = ["@platforms//os:linux"], |
| 40 | visibility = ["//y2023:__subpackages__"], |
| 41 | deps = [ |
| 42 | ":field_main", |
| 43 | ], |
| 44 | ) |
| 45 | |
| 46 | aos_downloader_dir( |
| 47 | name = "www_files", |
| 48 | srcs = [ |
| 49 | ":field_main_bundle.min.js", |
| 50 | ":files", |
| 51 | "//frc971/analysis:plot_index_bundle.min.js", |
| 52 | ], |
| 53 | dir = "www", |
| 54 | target_compatible_with = ["@platforms//os:linux"], |
| 55 | visibility = ["//visibility:public"], |
| 56 | ) |