angular/packages/compiler/BUILD.bazel
Paul Gschwendtner 0d025c5013 build: support new ng_project rule (#61336)
Supports the `ng_project` rule with the local compiler-cli version
from HEAD.

PR Close #61336
2025-05-14 08:31:33 -07:00

63 lines
1.4 KiB
Text

load("//tools:defaults.bzl", "ng_package", "ts_library", "tsec_test")
load("//tools:defaults2.bzl", "npm_package")
package(default_visibility = ["//visibility:public"])
ts_library(
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",
],
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/language-service/test:__pkg__",
],
deps = [
":compiler",
],
)
# 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"],
replace_prefixes = {
"npm_package/": "",
},
)
filegroup(
name = "files_for_docgen",
srcs = glob([
"*.ts",
"src/**/*.ts",
]),
)