Austin Schuh | aa3b086 | 2022-07-15 14:38:41 -0700 | [diff] [blame] | 1 | load("@npm//@bazel/typescript:index.bzl", "ts_library") |
| 2 | load("//tools/build_rules:js.bzl", "rollup_bundle") |
| 3 | |
| 4 | package(default_visibility = ["//visibility:public"]) |
| 5 | |
| 6 | ts_library( |
| 7 | name = "cpp_plot", |
| 8 | srcs = ["cpp_plot.ts"], |
| 9 | target_compatible_with = ["@platforms//os:linux"], |
| 10 | deps = [ |
| 11 | "//aos:configuration_ts_fbs", |
| 12 | "//aos/network/www:proxy", |
| 13 | "//frc971/analysis:plot_data_utils", |
| 14 | ], |
| 15 | ) |
| 16 | |
| 17 | rollup_bundle( |
| 18 | name = "cpp_plot_bundle", |
| 19 | entry_point = "cpp_plot.ts", |
| 20 | target_compatible_with = ["@platforms//os:linux"], |
| 21 | deps = [ |
| 22 | ":cpp_plot", |
| 23 | ], |
| 24 | ) |
| 25 | |
Austin Schuh | fcd5694 | 2022-07-18 17:41:32 -0700 | [diff] [blame^] | 26 | genrule( |
| 27 | name = "copy_css", |
| 28 | srcs = [ |
| 29 | "//aos/network/www:styles.css", |
| 30 | ], |
| 31 | outs = ["styles.css"], |
| 32 | cmd = "cp $< $@", |
| 33 | ) |
| 34 | |
Austin Schuh | aa3b086 | 2022-07-15 14:38:41 -0700 | [diff] [blame] | 35 | filegroup( |
| 36 | name = "cpp_plot_files", |
| 37 | srcs = [ |
Austin Schuh | fcd5694 | 2022-07-18 17:41:32 -0700 | [diff] [blame^] | 38 | "cpp_plot_bundle.js", |
Austin Schuh | aa3b086 | 2022-07-15 14:38:41 -0700 | [diff] [blame] | 39 | "cpp_plot_bundle.min.js", |
| 40 | "index.html", |
Austin Schuh | fcd5694 | 2022-07-18 17:41:32 -0700 | [diff] [blame^] | 41 | "styles.css", |
Austin Schuh | aa3b086 | 2022-07-15 14:38:41 -0700 | [diff] [blame] | 42 | ], |
| 43 | ) |