Fix the confusing `_lib` names in //scouting
After helping Wesley with a question, I realized that calling the
libraries `_lib` is not helpful. Instead, we should just use the names
specified in the BUILD files.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I936ba1316fd1d38cc592fd512aeea8e50411c6c4
diff --git a/scouting/www/BUILD b/scouting/www/BUILD
index 93bcbb2..04cd677 100644
--- a/scouting/www/BUILD
+++ b/scouting/www/BUILD
@@ -15,12 +15,12 @@
],
deps = [
"//:node_modules/@angular/animations",
- "//scouting/www/driver_ranking:_lib",
- "//scouting/www/entry:_lib",
- "//scouting/www/match_list:_lib",
- "//scouting/www/notes:_lib",
- "//scouting/www/shift_schedule:_lib",
- "//scouting/www/view:_lib",
+ "//scouting/www/driver_ranking",
+ "//scouting/www/entry",
+ "//scouting/www/match_list",
+ "//scouting/www/notes",
+ "//scouting/www/shift_schedule",
+ "//scouting/www/view",
],
)
diff --git a/scouting/www/match_list/BUILD b/scouting/www/match_list/BUILD
index c713dda..b2128db 100644
--- a/scouting/www/match_list/BUILD
+++ b/scouting/www/match_list/BUILD
@@ -13,7 +13,7 @@
"//scouting/webserver/requests/messages:error_response_ts_fbs",
"//scouting/webserver/requests/messages:request_all_matches_response_ts_fbs",
"//scouting/webserver/requests/messages:request_all_matches_ts_fbs",
- "//scouting/www/rpc:_lib",
+ "//scouting/www/rpc",
"@com_github_google_flatbuffers//ts:flatbuffers_ts",
],
)
diff --git a/scouting/www/view/BUILD b/scouting/www/view/BUILD
index 168feb6..25aa9fa 100644
--- a/scouting/www/view/BUILD
+++ b/scouting/www/view/BUILD
@@ -17,7 +17,7 @@
"//scouting/webserver/requests/messages:request_all_notes_ts_fbs",
"//scouting/webserver/requests/messages:request_data_scouting_response_ts_fbs",
"//scouting/webserver/requests/messages:request_data_scouting_ts_fbs",
- "//scouting/www/rpc:_lib",
+ "//scouting/www/rpc",
"@com_github_google_flatbuffers//ts:flatbuffers_ts",
],
)
diff --git a/tools/build_rules/js.bzl b/tools/build_rules/js.bzl
index ceb67aa..eb95510 100644
--- a/tools/build_rules/js.bzl
+++ b/tools/build_rules/js.bzl
@@ -1,7 +1,5 @@
load("@aspect_rules_js//js:providers.bzl", "JsInfo")
load("@bazel_skylib//rules:write_file.bzl", "write_file")
-load("@aspect_rules_js//js:defs.bzl", "js_library")
-load("@aspect_rules_js//npm:defs.bzl", "npm_package")
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
load("@aspect_rules_esbuild//esbuild:defs.bzl", "esbuild")
@@ -271,7 +269,7 @@
srcs.append(":_public_api")
ng_project(
- name = "_lib",
+ name = name,
srcs = srcs + [":_index"],
deps = deps + PACKAGE_DEPS,
#visibility = ["//visibility:private"],
@@ -279,20 +277,6 @@
**kwargs
)
- js_library(
- name = name + "_js",
- srcs = [":_lib"],
- visibility = ["//visibility:public"],
- )
-
- npm_package(
- name = name,
- srcs = ["package.json", ":_lib"],
- # This is a perf improvement; the default will be flipped to False in rules_js 2.0
- include_runfiles = False,
- visibility = ["//visibility:public"],
- )
-
def rollup_bundle(name, entry_point, deps = [], visibility = None, **kwargs):
"""Calls the upstream rollup_bundle() and exposes a .min.js file.