blob: f8b706c70a0042a015c1b644ff567200c6d1c89d [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",
28 "//y2023/localizer:status_ts_fbs",
29 "//y2023/localizer:visualization_ts_fbs",
Maxwell Hendersonad312342023-01-10 12:07:47 -080030 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
31 ],
32)
33
34rollup_bundle(
35 name = "field_main_bundle",
36 entry_point = "field_main.ts",
37 target_compatible_with = ["@platforms//os:linux"],
38 visibility = ["//y2023:__subpackages__"],
39 deps = [
40 ":field_main",
41 ],
42)
43
44aos_downloader_dir(
45 name = "www_files",
46 srcs = [
47 ":field_main_bundle.min.js",
48 ":files",
49 "//frc971/analysis:plot_index_bundle.min.js",
50 ],
51 dir = "www",
52 target_compatible_with = ["@platforms//os:linux"],
53 visibility = ["//visibility:public"],
54)