https://github.com/angular/angular
Raw File
Tip revision: 0cd056abe73b676bdca6fd34c004e6b7cbcabac3 authored by Jessica Janiuk on 16 November 2022, 17:12:37 UTC
release: cut the v14.2.11 release
Tip revision: 0cd056a
BUILD.bazel
load("//tools:defaults.bzl", "api_golden_test_npm_package", "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",
    ],
)

ng_package(
    name = "npm_package",
    srcs = [
        "package.json",
    ],
    nested_packages = [
        "//packages/localize/schematics:npm_package",
        "//packages/localize/tools:npm_package",
    ],
    skip_type_bundling = [
        # For the "init" 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.
        "init",
    ],
    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"],
)
back to top