blob: 539fa6ddcbc8ac5ce3f491a16e1262cfab681f5b [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",
27 "//y2023/control_loops/superstructure:superstructure_status_ts_fbs",
28 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
29 ],
30)
31
32rollup_bundle(
33 name = "field_main_bundle",
34 entry_point = "field_main.ts",
35 target_compatible_with = ["@platforms//os:linux"],
36 visibility = ["//y2023:__subpackages__"],
37 deps = [
38 ":field_main",
39 ],
40)
41
42aos_downloader_dir(
43 name = "www_files",
44 srcs = [
45 ":field_main_bundle.min.js",
46 ":files",
47 "//frc971/analysis:plot_index_bundle.min.js",
48 ],
49 dir = "www",
50 target_compatible_with = ["@platforms//os:linux"],
51 visibility = ["//visibility:public"],
52)