This repository was archived by the owner on Jan 19, 2023. It is now read-only.
forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.bazel
64 lines (59 loc) · 1.84 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
load("//tools:defaults.bzl", "api_golden_test_npm_package", "extract_types", "ng_package", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "localize",
srcs = glob(
[
"*.ts",
"src/**/*.ts",
],
),
module_name = "@angular/localize",
deps = [
"//packages/localize/src/localize",
"//packages/localize/src/utils",
],
)
extract_types(
name = "api_type_definitions",
deps = [":localize"],
)
ng_package(
name = "npm_package",
srcs = [
"package.json",
":api_type_definitions",
],
nested_packages = [
"//packages/localize/schematics:npm_package",
"//packages/localize/tools:npm_package",
],
skip_type_bundling = [
# For the primary entry-point we disable type bundling because API extractor
# does not properly handle module augumentation.
# TODO: Remove once https://github.com/microsoft/rushstack/issues/2090 is solved.
"",
],
tags = [
"release-with-framework",
],
deps = [
":localize",
"//packages/localize/init",
],
)
api_golden_test_npm_package(
name = "localize_api",
data = [
":npm_package",
"//goldens:public-api",
],
golden_dir = "angular/goldens/public-api/localize",
npm_package = "angular/packages/localize/npm_package",
# The logic for the localize function is exported in the primary entry-point, but users
# are not supposed to import it from there. We still want to guard these exports though.
strip_export_pattern = "^ɵ(?!.localize|LocalizeFn|TranslateFn)",
# The tool entry-point uses namespace aliases and API extractor needs to be
# able to resolve `@babel/core` to fully understand the `types` re-export/alias.
types = ["@npm//@types/babel__core"],
)