blob: 17946f8aacf97b4250d11fc6123775ebf84c806a [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",
10 ]),
11 visibility = ["//visibility:public"],
12)
13
Philipp Schrader3de4dfc2023-02-15 20:18:25 -080014ts_project(
Maxwell Hendersonad312342023-01-10 12:07:47 -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",
Milo Lin72fb9012023-03-10 19:53:19 -080026 "//frc971/control_loops:control_loops_ts_fbs",
Maxwell Hendersonad312342023-01-10 12:07:47 -080027 "//frc971/control_loops/drivetrain:drivetrain_status_ts_fbs",
James Kuszmaulfb894572023-02-23 17:25:06 -080028 "//frc971/control_loops/drivetrain/localization:localizer_output_ts_fbs",
Milo Line6571c02023-03-04 21:08:20 -080029 "//y2023/control_loops/superstructure:superstructure_status_ts_fbs",
James Kuszmaulfb894572023-02-23 17:25:06 -080030 "//y2023/localizer:status_ts_fbs",
31 "//y2023/localizer:visualization_ts_fbs",
Maxwell Hendersonad312342023-01-10 12:07:47 -080032 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
33 ],
34)
35
36rollup_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
46aos_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)