blob: 2e8be80aff02bc3390662519f78016dcfa0716e5 [file] [log] [blame]
Philipp Schrader3de4dfc2023-02-15 20:18:25 -08001load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")
Alex Perry554cec02019-03-23 20:15:12 -07002
3package(default_visibility = ["//visibility:public"])
4
5filegroup(
6 name = "files",
7 srcs = glob([
James Kuszmaul92ba0e52019-03-29 17:19:30 -07008 "**/*.html",
Alex Perry554cec02019-03-23 20:15:12 -07009 ]),
10)
11
Philipp Schrader3de4dfc2023-02-15 20:18:25 -080012ts_project(
Alex Perry554cec02019-03-23 20:15:12 -070013 name = "visualizer",
14 srcs = glob([
15 "*.ts",
James Kuszmaul92ba0e52019-03-29 17:19:30 -070016 ]) + ["camera_constants.ts"],
Philipp Schraderdada1072020-11-24 11:34:46 -080017 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul92ba0e52019-03-29 17:19:30 -070018)
19
20cc_binary(
21 name = "generate_camera",
22 srcs = ["generate_camera.cc"],
Philipp Schraderdada1072020-11-24 11:34:46 -080023 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul92ba0e52019-03-29 17:19:30 -070024 deps = ["//y2019:constants"],
25)
26
27genrule(
28 name = "gen_cam_ts",
29 outs = ["camera_constants.ts"],
30 cmd = "$(location :generate_camera) $@",
Philipp Schraderdada1072020-11-24 11:34:46 -080031 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul92ba0e52019-03-29 17:19:30 -070032 tools = [":generate_camera"],
Alex Perry554cec02019-03-23 20:15:12 -070033)
34
35rollup_bundle(
36 name = "visualizer_bundle",
Austin Schuhda9d0602019-09-15 17:29:38 -070037 entry_point = "main.ts",
Philipp Schraderdada1072020-11-24 11:34:46 -080038 target_compatible_with = ["@platforms//os:linux"],
Alex Perry554cec02019-03-23 20:15:12 -070039 deps = [
40 ":visualizer",
41 ],
42)