build(bazel): fine-grained npm deps and idiomatic install of @angular/bazel (#26607)
PR Close #26607
This commit is contained in:

committed by
Alex Rickabaugh

parent
81e571b908
commit
c251a5a4d1
@ -14,6 +14,7 @@ ts_library(
|
||||
),
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"@ngdeps//typescript",
|
||||
],
|
||||
)
|
||||
|
||||
@ -27,6 +28,7 @@ ts_library(
|
||||
deps = [
|
||||
":lib",
|
||||
"//packages:types",
|
||||
"@ngdeps//typescript",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -10,14 +10,16 @@
|
||||
# because it introduces an extra target_bin target.
|
||||
load("@build_bazel_rules_nodejs//internal/node:node.bzl", "nodejs_binary", "nodejs_test")
|
||||
|
||||
DEFAULT_NODE_MODULES = "@angular_deps//:node_modules"
|
||||
|
||||
def js_expected_symbol_test(name, src, golden, node_modules = DEFAULT_NODE_MODULES, **kwargs):
|
||||
def js_expected_symbol_test(name, src, golden, data = [], **kwargs):
|
||||
"""This test verifies that a set of top level symbols from a javascript file match a gold file.
|
||||
"""
|
||||
all_data = [src, golden]
|
||||
all_data += [Label("//tools/symbol-extractor:lib")]
|
||||
all_data += [Label("@bazel_tools//tools/bash/runfiles")]
|
||||
all_data = data + [
|
||||
src,
|
||||
golden,
|
||||
Label("//tools/symbol-extractor:lib"),
|
||||
Label("@bazel_tools//tools/bash/runfiles"),
|
||||
Label("@ngdeps//typescript"),
|
||||
]
|
||||
entry_point = "angular/tools/symbol-extractor/cli.js"
|
||||
|
||||
nodejs_test(
|
||||
@ -25,7 +27,6 @@ def js_expected_symbol_test(name, src, golden, node_modules = DEFAULT_NODE_MODUL
|
||||
data = all_data,
|
||||
entry_point = entry_point,
|
||||
templated_args = ["$(location %s)" % src, "$(location %s)" % golden],
|
||||
node_modules = node_modules,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
@ -35,6 +36,5 @@ def js_expected_symbol_test(name, src, golden, node_modules = DEFAULT_NODE_MODUL
|
||||
data = all_data,
|
||||
entry_point = entry_point,
|
||||
templated_args = ["$(location %s)" % src, "$(location %s)" % golden, "--accept"],
|
||||
node_modules = node_modules,
|
||||
**kwargs
|
||||
)
|
||||
|
Reference in New Issue
Block a user