2021-05-21 16:58:25 -04:00
|
|
|
load("@build_bazel_rules_nodejs//:index.bzl", "generated_file_test")
|
|
|
|
load("//packages/common/locales:index.bzl", "generate_base_currencies_file")
|
2021-06-28 13:50:44 -04:00
|
|
|
load("//tools:defaults.bzl", "api_golden_test_npm_package", "ng_module", "ng_package")
|
2017-06-02 12:43:52 -04:00
|
|
|
|
2019-01-16 04:19:01 -05:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
2021-05-21 16:58:25 -04:00
|
|
|
# This generates the `src/i18n/currencies.ts` file through the `generate-locales` tool. Since
|
|
|
|
# the base currencies file is checked-in for Google3, we add a `generated_file_test` to ensure
|
|
|
|
# the checked-in file is up-to-date. To disambiguate from the test, we use a more precise target
|
|
|
|
# name here.
|
|
|
|
generate_base_currencies_file(
|
|
|
|
name = "base_currencies_file_generated",
|
|
|
|
output_file = "base_currencies_generated.ts",
|
|
|
|
)
|
|
|
|
|
|
|
|
generated_file_test(
|
|
|
|
name = "base_currencies_file",
|
|
|
|
src = "src/i18n/currencies.ts",
|
|
|
|
generated = ":base_currencies_file_generated",
|
|
|
|
)
|
|
|
|
|
2018-02-02 12:18:44 -05:00
|
|
|
ng_module(
|
2017-06-02 12:43:52 -04:00
|
|
|
name = "common",
|
2017-12-06 09:56:49 -05:00
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"*.ts",
|
|
|
|
"src/**/*.ts",
|
|
|
|
],
|
|
|
|
),
|
|
|
|
deps = [
|
|
|
|
"//packages/core",
|
2019-02-20 12:54:42 -05:00
|
|
|
"@npm//rxjs",
|
2017-12-06 09:56:49 -05:00
|
|
|
],
|
2017-06-02 12:43:52 -04:00
|
|
|
)
|
2018-02-13 14:26:06 -05:00
|
|
|
|
|
|
|
ng_package(
|
|
|
|
name = "npm_package",
|
2018-03-13 14:00:53 -04:00
|
|
|
srcs = [
|
|
|
|
"package.json",
|
|
|
|
"//packages/common/http:package.json",
|
|
|
|
"//packages/common/http/testing:package.json",
|
|
|
|
"//packages/common/testing:package.json",
|
2019-04-25 10:36:49 -04:00
|
|
|
"//packages/common/upgrade:package.json",
|
2018-03-13 14:00:53 -04:00
|
|
|
],
|
2019-06-07 16:38:06 -04:00
|
|
|
entry_point = ":index.ts",
|
2019-12-28 19:37:59 -05:00
|
|
|
nested_packages = ["//packages/common/locales:package"],
|
2018-06-05 14:38:46 -04:00
|
|
|
tags = [
|
|
|
|
"release-with-framework",
|
|
|
|
],
|
2018-12-11 19:53:42 -05:00
|
|
|
# Do not add more to this list.
|
|
|
|
# Dependencies on the full npm_package cause long re-builds.
|
|
|
|
visibility = [
|
2020-02-04 14:45:40 -05:00
|
|
|
"//integration:__pkg__",
|
2018-12-11 19:53:42 -05:00
|
|
|
"//packages/bazel/test/ng_package:__pkg__",
|
2019-01-22 12:46:51 -05:00
|
|
|
"//packages/compiler-cli/integrationtest:__pkg__",
|
2019-03-20 09:47:58 -04:00
|
|
|
"//packages/compiler-cli/ngcc/test:__pkg__",
|
2018-12-11 19:53:42 -05:00
|
|
|
"//packages/compiler-cli/test:__pkg__",
|
|
|
|
"//packages/compiler-cli/test/diagnostics:__pkg__",
|
|
|
|
"//packages/compiler-cli/test/transformers:__pkg__",
|
|
|
|
"//packages/compiler/test:__pkg__",
|
|
|
|
"//packages/language-service/test:__pkg__",
|
|
|
|
],
|
2018-02-13 14:26:06 -05:00
|
|
|
deps = [
|
|
|
|
"//packages/common",
|
|
|
|
"//packages/common/http",
|
|
|
|
"//packages/common/http/testing",
|
|
|
|
"//packages/common/testing",
|
2019-04-25 10:36:49 -04:00
|
|
|
"//packages/common/upgrade",
|
2018-02-13 14:26:06 -05:00
|
|
|
],
|
|
|
|
)
|
2020-02-26 12:09:35 -05:00
|
|
|
|
2021-06-28 13:50:44 -04:00
|
|
|
api_golden_test_npm_package(
|
2020-02-26 12:09:35 -05:00
|
|
|
name = "common_api",
|
|
|
|
data = [
|
|
|
|
":npm_package",
|
|
|
|
"//goldens:public-api",
|
|
|
|
],
|
2021-06-28 13:50:44 -04:00
|
|
|
golden_dir = "angular/goldens/public-api/common",
|
|
|
|
npm_package = "angular/packages/common/npm_package",
|
2020-02-26 12:09:35 -05:00
|
|
|
)
|