b43b164a61
This produces a directory following the Angular Package layout spec. Includes integration test coverage by making a minimal ng_package in integration/bazel. Unit tests verify the content of the @angular/core and @angular/common packages. This doesn't totally match our current output, but is good enough to unblock some early adopters. It re-uses logic from the rollup_bundle rule in rules_nodejs. It should also eventually have the .pack and .publish secondary targets like npm_package rule. PR Close #22221
37 lines
859 B
Python
37 lines
859 B
Python
load("//tools:defaults.bzl", "ts_library")
|
|
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
|
|
|
|
exports_files(["package.json"])
|
|
|
|
# The tests in this package must run in separate targets, since they change
|
|
# working directory and therefore have mutable global state that causes test
|
|
# isolation failures.
|
|
|
|
ts_library(
|
|
name = "core_spec_lib",
|
|
testonly = True,
|
|
srcs = ["core_package.spec.ts"],
|
|
deps = ["//packages:types"],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "core_package",
|
|
srcs = [":core_spec_lib"],
|
|
data = [
|
|
"//packages/core:npm_package",
|
|
],
|
|
)
|
|
|
|
ts_library(
|
|
name = "common_spec_lib",
|
|
testonly = True,
|
|
srcs = ["common_package.spec.ts"],
|
|
deps = ["//packages:types"],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "common_package",
|
|
srcs = [":common_spec_lib"],
|
|
data = ["//packages/common:npm_package"],
|
|
)
|