angular/packages/compiler/BUILD.bazel
Paul Gschwendtner d081ef9b06 build: replace all ng_package with new rule from rules_angular (#61843)
Replaces all `ng_package` rule with the new rule from `rules_angular`.

PR Close #61843
2025-06-04 09:13:41 +00:00

67 lines
1.6 KiB
Text

load("//tools:defaults.bzl", "tsec_test")
load("//tools:defaults2.bzl", "ng_package", "npm_package", "ts_project")
package(default_visibility = ["//visibility:public"])
ts_project(
name = "compiler",
srcs = glob(
[
"*.ts",
"src/**/*.ts",
],
),
)
tsec_test(
name = "tsec_test",
target = "compiler",
tsconfig = "//packages:tsec_config",
)
ng_package(
name = "npm_package",
srcs = [
"package.json",
],
package = "@angular/compiler",
side_effect_entry_points = [
"@angular/compiler",
],
tags = [
"release-with-framework",
],
# Do not add more to this list.
# Dependencies on the full npm_package cause long re-builds.
visibility = [
"//adev:__pkg__",
"//integration:__subpackages__",
"//modules/ssr-benchmarks:__subpackages__",
"//packages/compiler-cli/integrationtest:__pkg__",
"//packages/core/test/bundling:__subpackages__",
"//packages/core/test/playground/zone-signal-input:__pkg__",
"//packages/language-service/test:__pkg__",
"@npm//@angular/build-tooling/shared-scripts:__subpackages__",
],
deps = [
":compiler_rjs",
],
)
# TODO(devversion): Temporary early `npm_package` for making compiler usable in `rules_angular`.
# Long-term, `pkg_npm` will be migrated to `npm_package` in general.
npm_package(
name = "pkg",
srcs = [":npm_package_nosub"],
replace_prefixes = {
"npm_package_nosub/": "",
},
)
filegroup(
name = "files_for_docgen",
srcs = glob([
"*.ts",
"src/**/*.ts",
]),
)