Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame^] | 1 | load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file") |
| 2 | load("@npm//:defs.bzl", "npm_link_all_packages") |
| 3 | load("//tools/build_rules:js.bzl", "ng_application") |
| 4 | load(":defs.bzl", "assemble_static_files") |
Alex Perry | b316808 | 2022-01-22 13:36:13 -0800 | [diff] [blame] | 5 | |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame^] | 6 | npm_link_all_packages(name = "node_modules") |
| 7 | |
| 8 | ng_application( |
Alex Perry | b316808 | 2022-01-22 13:36:13 -0800 | [diff] [blame] | 9 | name = "app", |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame^] | 10 | extra_srcs = [ |
| 11 | "app/common.css", |
| 12 | ], |
| 13 | html_assets = [ |
| 14 | "favicon.ico", |
| 15 | ], |
Alex Perry | b316808 | 2022-01-22 13:36:13 -0800 | [diff] [blame] | 16 | deps = [ |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame^] | 17 | "//:node_modules/@angular/animations", |
| 18 | "//scouting/www/driver_ranking:_lib", |
| 19 | "//scouting/www/entry:_lib", |
| 20 | "//scouting/www/import_match_list:_lib", |
| 21 | "//scouting/www/match_list:_lib", |
| 22 | "//scouting/www/notes:_lib", |
| 23 | "//scouting/www/shift_schedule:_lib", |
| 24 | "//scouting/www/view:_lib", |
Alex Perry | b316808 | 2022-01-22 13:36:13 -0800 | [diff] [blame] | 25 | ], |
| 26 | ) |
| 27 | |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame^] | 28 | assemble_static_files( |
Philipp Schrader | 577befe | 2022-03-15 00:00:49 -0700 | [diff] [blame] | 29 | name = "static_files", |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame^] | 30 | app_files = ":app", |
| 31 | pictures = [ |
| 32 | "//third_party/y2022/field:pictures", |
Philipp Schrader | 577befe | 2022-03-15 00:00:49 -0700 | [diff] [blame] | 33 | ], |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame^] | 34 | replace_prefixes = { |
| 35 | "prod": "", |
| 36 | "dev": "", |
| 37 | "third_party/y2022": "pictures", |
| 38 | }, |
Philipp Schrader | 684a8e8 | 2022-02-25 17:39:28 -0800 | [diff] [blame] | 39 | visibility = ["//visibility:public"], |
Alex Perry | b316808 | 2022-01-22 13:36:13 -0800 | [diff] [blame] | 40 | ) |
| 41 | |
Philipp Schrader | 175a93c | 2023-02-19 13:13:40 -0800 | [diff] [blame^] | 42 | copy_file( |
| 43 | name = "app_common_css", |
| 44 | src = "common.css", |
| 45 | out = "app/common.css", |
Philipp Schrader | 72beced | 2022-03-07 05:29:52 -0800 | [diff] [blame] | 46 | visibility = ["//scouting/www:__subpackages__"], |
| 47 | ) |