blob: 27cc69ee6890625af3168de29592d5f41c3c1259 [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",
26 "//frc971/control_loops/drivetrain:drivetrain_status_ts_fbs",
James Kuszmaulfb894572023-02-23 17:25:06 -080027 "//frc971/control_loops/drivetrain/localization:localizer_output_ts_fbs",
Milo Line6571c02023-03-04 21:08:20 -080028 "//y2023/control_loops/superstructure:superstructure_status_ts_fbs",
James Kuszmaulfb894572023-02-23 17:25:06 -080029 "//y2023/localizer:status_ts_fbs",
30 "//y2023/localizer:visualization_ts_fbs",
Maxwell Hendersonad312342023-01-10 12:07:47 -080031 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
32 ],
33)
34
35rollup_bundle(
36 name = "field_main_bundle",
37 entry_point = "field_main.ts",
38 target_compatible_with = ["@platforms//os:linux"],
39 visibility = ["//y2023:__subpackages__"],
40 deps = [
41 ":field_main",
42 ],
43)
44
45aos_downloader_dir(
46 name = "www_files",
47 srcs = [
48 ":field_main_bundle.min.js",
49 ":files",
50 "//frc971/analysis:plot_index_bundle.min.js",
51 ],
52 dir = "www",
53 target_compatible_with = ["@platforms//os:linux"],
54 visibility = ["//visibility:public"],
55)