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