mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This adds `generate_api_docs` targets to all of the packages for which we publish api reference docs. One known issue here is that any type information that comes from another package (e.g. router depending on core) currently resolve to `any` because the other sources are not available in the program. This can be tackled in a follow-up commit. This commit also updates the install patch for `@angular/build-tools` to use the local version of compiler-cli. PR Close #52034
77 lines
1.9 KiB
Text
77 lines
1.9 KiB
Text
load("//tools:defaults.bzl", "api_golden_test", "api_golden_test_npm_package", "ng_module", "ng_package")
|
|
load("@npm//@angular/build-tooling/bazel/api-gen:generate_api_docs.bzl", "generate_api_docs")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
ng_module(
|
|
name = "forms",
|
|
srcs = glob(
|
|
[
|
|
"*.ts",
|
|
"src/**/*.ts",
|
|
],
|
|
),
|
|
deps = [
|
|
"//packages/core",
|
|
"//packages/platform-browser",
|
|
"@npm//rxjs",
|
|
],
|
|
)
|
|
|
|
ng_package(
|
|
name = "npm_package",
|
|
package_name = "@angular/forms",
|
|
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 = [
|
|
"//aio:__pkg__",
|
|
"//aio/content/examples:__subpackages__",
|
|
"//aio/tools/examples:__pkg__",
|
|
"//integration:__subpackages__",
|
|
"//packages/compiler-cli/integrationtest:__pkg__",
|
|
"//packages/compiler-cli/test/diagnostics:__pkg__",
|
|
"//packages/language-service/test:__pkg__",
|
|
],
|
|
deps = [
|
|
":forms",
|
|
],
|
|
)
|
|
|
|
api_golden_test_npm_package(
|
|
name = "forms_api",
|
|
data = [
|
|
":npm_package",
|
|
"//goldens:public-api",
|
|
],
|
|
golden_dir = "angular/goldens/public-api/forms",
|
|
npm_package = "angular/packages/forms/npm_package",
|
|
)
|
|
|
|
api_golden_test(
|
|
name = "forms_errors",
|
|
data = [
|
|
"//goldens:public-api",
|
|
"//packages/forms",
|
|
],
|
|
entry_point = "angular/packages/forms/src/errors.d.ts",
|
|
golden = "angular/goldens/public-api/forms/errors.md",
|
|
)
|
|
|
|
filegroup(
|
|
name = "files_for_docgen",
|
|
srcs = glob([
|
|
"*.ts",
|
|
"src/**/*.ts",
|
|
]) + ["PACKAGE.md"],
|
|
)
|
|
|
|
generate_api_docs(
|
|
name = "forms_docs",
|
|
srcs = [":files_for_docgen"],
|
|
entry_point = ":index.ts",
|
|
module_name = "@angular/forms",
|
|
)
|