angular-cn/packages/compiler-cli/BUILD.bazel

91 lines
2.6 KiB
Python

package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "pkg_npm", "ts_api_guardian_test", "ts_config", "ts_library")
ts_config(
name = "tsconfig",
src = "tsconfig-build.json",
deps = ["//packages:tsconfig-build.json"],
)
ts_library(
name = "compiler-cli",
srcs = glob(
[
"*.ts",
"src/**/*.ts",
],
exclude = [
"src/integrationtest/**/*.ts",
],
),
tsconfig = ":tsconfig",
deps = [
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/core",
"//packages/compiler-cli/src/ngtsc/core:api",
"//packages/compiler-cli/src/ngtsc/diagnostics",
"//packages/compiler-cli/src/ngtsc/file_system",
"//packages/compiler-cli/src/ngtsc/incremental",
"//packages/compiler-cli/src/ngtsc/indexer",
"//packages/compiler-cli/src/ngtsc/perf",
"//packages/compiler-cli/src/ngtsc/reflection",
"//packages/compiler-cli/src/ngtsc/shims",
"//packages/compiler-cli/src/ngtsc/translator",
"//packages/compiler-cli/src/ngtsc/typecheck",
"//packages/compiler-cli/src/ngtsc/typecheck/api",
"@npm//@bazel/typescript",
"@npm//@types/node",
"@npm//chokidar",
"@npm//fs-extra",
"@npm//minimist",
"@npm//reflect-metadata",
"@npm//tsickle",
"@npm//typescript",
],
)
pkg_npm(
name = "npm_package",
srcs = [
"package.json",
],
tags = [
"release-with-framework",
],
# Do not add more to this list.
# Dependencies on the full npm_package cause long re-builds.
visibility = [
"//integration:__pkg__",
"//packages/compiler-cli/integrationtest:__pkg__",
],
deps = [
":compiler-cli",
"//packages/compiler-cli/linker",
"//packages/compiler-cli/linker/babel",
"//packages/compiler-cli/ngcc",
"//packages/compiler-cli/src/ngtsc/file_system/testing",
"//packages/compiler-cli/src/ngtsc/logging/testing",
],
)
ts_api_guardian_test(
name = "error_code_api",
actual = "angular/packages/compiler-cli/npm_package/src/ngtsc/diagnostics/src/error_code.d.ts",
data = [
":npm_package",
"//goldens:public-api",
],
golden = "angular/goldens/public-api/compiler-cli/error_code.d.ts",
)
ts_api_guardian_test(
name = "compiler_options_api",
actual = "angular/packages/compiler-cli/npm_package/src/ngtsc/core/api/src/public_options.d.ts",
data = [
":npm_package",
"//goldens:public-api",
],
golden = "angular/goldens/public-api/compiler-cli/compiler_options.d.ts",
)