blob: 0c05900e747d086d85722d770ce5480a9c0e9260 [file] [log] [blame]
Philipp Schrader3de4dfc2023-02-15 20:18:25 -08001load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")
James Kuszmaul2d8fa2a2020-03-01 13:51:50 -08002load("//frc971/downloader:downloader.bzl", "aos_downloader_dir")
Alex Perry5f474f22020-02-01 12:14:24 -08003
Philipp Schrader3de4dfc2023-02-15 20:18:25 -08004ts_project(
Alex Perrya24127d2020-03-06 21:00:32 -08005 name = "camera_main",
Alex Perry5f474f22020-02-01 12:14:24 -08006 srcs = [
Alex Perrya24127d2020-03-06 21:00:32 -08007 "camera_main.ts",
Brian Silverman26478412020-06-25 14:58:18 -07008 "image_handler.ts",
Alex Perry5f474f22020-02-01 12:14:24 -08009 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080010 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha4f69d62020-02-28 13:58:14 -080011 visibility = ["//y2020:__subpackages__"],
Alex Perry5f474f22020-02-01 12:14:24 -080012 deps = [
Philipp Schradera227d042020-11-14 17:33:52 -080013 "//aos:configuration_ts_fbs",
14 "//aos/network:connect_ts_fbs",
James Kuszmaul71a81932020-12-15 21:08:01 -080015 "//aos/network:web_proxy_ts_fbs",
Alex Perry5f474f22020-02-01 12:14:24 -080016 "//aos/network/www:proxy",
Jim Ostrowski977850f2022-01-22 21:04:22 -080017 "//frc971/vision:vision_ts_fbs",
Alex Perryd5e13572020-02-22 15:15:08 -080018 "//y2020/vision/sift:sift_ts_fbs",
Philipp Schradere625ba22020-11-16 20:11:37 -080019 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
Alex Perry5f474f22020-02-01 12:14:24 -080020 ],
Alex Perry5f474f22020-02-01 12:14:24 -080021)
22
Philipp Schrader3de4dfc2023-02-15 20:18:25 -080023ts_project(
Alex Perry5427c9a2020-02-15 17:43:45 -080024 name = "field_main",
25 srcs = [
Alex Perry5427c9a2020-02-15 17:43:45 -080026 "constants.ts",
Brian Silverman26478412020-06-25 14:58:18 -070027 "field_handler.ts",
28 "field_main.ts",
Alex Perry5427c9a2020-02-15 17:43:45 -080029 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080030 target_compatible_with = ["@platforms//os:linux"],
Alex Perry5427c9a2020-02-15 17:43:45 -080031 deps = [
Philipp Schradera227d042020-11-14 17:33:52 -080032 "//aos:configuration_ts_fbs",
33 "//aos/network:connect_ts_fbs",
James Kuszmaul71a81932020-12-15 21:08:01 -080034 "//aos/network:web_proxy_ts_fbs",
Alex Perry5427c9a2020-02-15 17:43:45 -080035 "//aos/network/www:proxy",
Alex Perry2124ae82020-03-07 14:19:06 -080036 "//frc971/control_loops/drivetrain:drivetrain_status_ts_fbs",
James Kuszmaulf75ecd62021-10-23 14:33:46 -070037 "//y2020/control_loops/drivetrain:localizer_debug_ts_fbs",
James Kuszmaul5e6aa252021-08-28 22:19:29 -070038 "//y2020/control_loops/superstructure:superstructure_status_ts_fbs",
Brian Silverman26478412020-06-25 14:58:18 -070039 "//y2020/vision/sift:sift_ts_fbs",
Austin Schuhda9d0602019-09-15 17:29:38 -070040 "@com_github_google_flatbuffers//ts:flatbuffers_ts",
Alex Perry5427c9a2020-02-15 17:43:45 -080041 ],
42)
43
Alex Perry5f474f22020-02-01 12:14:24 -080044rollup_bundle(
Alex Perrya24127d2020-03-06 21:00:32 -080045 name = "camera_main_bundle",
Austin Schuhda9d0602019-09-15 17:29:38 -070046 entry_point = "camera_main.ts",
Philipp Schraderdada1072020-11-24 11:34:46 -080047 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha4f69d62020-02-28 13:58:14 -080048 visibility = ["//y2020:__subpackages__"],
Alex Perry5f474f22020-02-01 12:14:24 -080049 deps = [
Alex Perrya24127d2020-03-06 21:00:32 -080050 "camera_main",
Alex Perry5f474f22020-02-01 12:14:24 -080051 ],
Alex Perry5f474f22020-02-01 12:14:24 -080052)
53
Alex Perry5427c9a2020-02-15 17:43:45 -080054rollup_bundle(
55 name = "field_main_bundle",
Austin Schuhda9d0602019-09-15 17:29:38 -070056 entry_point = "field_main.ts",
Philipp Schraderdada1072020-11-24 11:34:46 -080057 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman26478412020-06-25 14:58:18 -070058 visibility = ["//y2020:__subpackages__"],
Alex Perry5427c9a2020-02-15 17:43:45 -080059 deps = [
60 "field_main",
61 ],
Alex Perry5427c9a2020-02-15 17:43:45 -080062)
63
Alex Perry5f474f22020-02-01 12:14:24 -080064filegroup(
65 name = "files",
66 srcs = glob([
67 "**/*.html",
68 "**/*.css",
69 ]),
Austin Schuha4f69d62020-02-28 13:58:14 -080070 visibility = ["//visibility:public"],
Alex Perry5f474f22020-02-01 12:14:24 -080071)
72
James Kuszmaul2d8fa2a2020-03-01 13:51:50 -080073aos_downloader_dir(
74 name = "www_files",
75 srcs = [
Alex Perrya24127d2020-03-06 21:00:32 -080076 ":camera_main_bundle",
77 ":field_main_bundle",
James Kuszmaul2d8fa2a2020-03-01 13:51:50 -080078 ":files",
James Kuszmaul35139172021-09-05 15:53:48 -070079 "//frc971/analysis:plot_index_bundle.min.js",
James Kuszmaul2d8fa2a2020-03-01 13:51:50 -080080 ],
81 dir = "www",
Philipp Schraderdada1072020-11-24 11:34:46 -080082 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul2d8fa2a2020-03-01 13:51:50 -080083 visibility = ["//visibility:public"],
84)