blob: 85af3cafffce3d6177dbce62603462af3ceda776 [file] [log] [blame]
Philipp Schrader175a93c2023-02-19 13:13:40 -08001load("@npm//:defs.bzl", "npm_link_all_packages")
2load("//tools/build_rules:js.bzl", "ng_pkg")
Philipp Schrader3d7dedc2024-03-16 16:27:25 -07003load("//tools/build_rules:template.bzl", "jinja2_template")
Philipp Schrader80587432022-03-05 15:41:22 -08004
Philipp Schrader175a93c2023-02-19 13:13:40 -08005npm_link_all_packages(name = "node_modules")
6
7ng_pkg(
Philipp Schrader80587432022-03-05 15:41:22 -08008 name = "entry",
Philipp Schrader175a93c2023-02-19 13:13:40 -08009 extra_srcs = [
Philipp Schrader3d7dedc2024-03-16 16:27:25 -070010 ":action_helper.ts",
Philipp Schrader175a93c2023-02-19 13:13:40 -080011 "//scouting/www:app_common_css",
Philipp Schrader72beced2022-03-07 05:29:52 -080012 ],
Philipp Schrader80587432022-03-05 15:41:22 -080013 deps = [
Philipp Schradere5d13942024-03-17 15:44:35 -070014 ":node_modules",
15 "//:node_modules/flatbuffers",
Philipp Schrader80587432022-03-05 15:41:22 -080016 ],
17)
Philipp Schrader3d7dedc2024-03-16 16:27:25 -070018
19jinja2_template(
20 name = "action_helper.ts",
21 src = "action_helper.jinja2.ts",
22 list_parameters = {
23 # Is there a way to auto-generate the list of actions here? Would be
24 # nice not to have a duplicate list here when they're already known in
25 # the .fbs file.
26 "ACTIONS": [
Emily Markovaf17f2812024-04-03 20:55:12 -070027 "NoShowAction",
Philipp Schrader3d7dedc2024-03-16 16:27:25 -070028 "EndMatchAction",
29 "MobilityAction",
30 "PenaltyAction",
31 "PickupNoteAction",
32 "PlaceNoteAction",
33 "RobotDeathAction",
34 "StartMatchAction",
35 "EndAutoPhaseAction",
36 "EndTeleopPhaseAction",
37 ],
38 },
39)