55 lines
1.4 KiB
Python
55 lines
1.4 KiB
Python
package(default_visibility = ["//visibility:public"])
|
|
|
|
load("//tools:defaults.bzl", "ts_library")
|
|
load("//tools/symbol-extractor:index.bzl", "js_expected_symbol_test")
|
|
load("//packages/bazel/src:ng_rollup_bundle.bzl", "ng_rollup_bundle")
|
|
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
|
|
|
|
ts_library(
|
|
name = "injection",
|
|
srcs = [
|
|
"index.ts",
|
|
"usage.ts",
|
|
],
|
|
deps = [
|
|
"//packages/core",
|
|
],
|
|
)
|
|
|
|
ng_rollup_bundle(
|
|
name = "bundle",
|
|
# TODO(alexeagle): This is inconsistent.
|
|
# We try to teach users to always have their workspace at the start of a
|
|
# path, to disambiguate from other workspaces.
|
|
# Here, the rule implementation is looking in an execroot where the layout
|
|
# has an "external" directory for external dependencies.
|
|
# This should probably start with "angular/" and let the rule deal with it.
|
|
entry_point = "packages/core/test/bundling/injection/index.js",
|
|
deps = [
|
|
":injection",
|
|
"//packages/core",
|
|
],
|
|
)
|
|
|
|
ts_library(
|
|
name = "test_lib",
|
|
testonly = 1,
|
|
srcs = glob(["*_spec.ts"]),
|
|
deps = [
|
|
":injection",
|
|
"//packages:types",
|
|
"//packages/core/testing",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "test",
|
|
deps = [":test_lib"],
|
|
)
|
|
|
|
js_expected_symbol_test(
|
|
name = "symbol_test",
|
|
src = ":bundle.min_debug.js",
|
|
golden = ":bundle.golden_symbols.json",
|
|
)
|