/
githubmirror
/
components
Обзор
Документация
Войти
/
githubmirror
/
components
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/cdk/BUILD.bazel
98 строк
3 KB
Alan Agius
build: update `aspect_rules_js` to `3.0.2` (#32907)
09 мар 2026, 19:47
Не верифицирован
09 мар 2026, 19:47
786909c
Код
Авторство
О чём код?
load("@bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory") load("@npm//:defs.bzl", "npm_link_all_packages") load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS", "CDK_ENTRYPOINTS_WITH_STYLES", "CDK_SCSS_LIBS", "CDK_TARGETS") load("//tools:defaults.bzl", "ng_package", "sass_library", "ts_project") package(default_visibility = ["//visibility:public"]) npm_link_all_packages() ts_project( name = "cdk", srcs = glob( ["*.ts"], exclude = ["**/*.spec.ts"], ), deps = ["//:node_modules/@angular/core"], ) # List of style files that need to be copied to the root of the CDK package. We do this # to make it easier for developers to import these styles without needing to know about # deep imports in the release output. Note that this is done for backwards compatibility # with the Gulp release output. TODO(devversion): consider removing this in the future. prebuiltStyles = [file for target in CDK_ENTRYPOINTS_WITH_STYLES for file in [ [ "%s-prebuilt.css" % target, target, ], ]] # Create genrules that output prebuilt stylesheets for secondary entry-points with styles. [genrule( name = "%s_prebuilt" % file, srcs = ["//src/cdk/%s:%s" % (target, file)], outs = [file], cmd = "cp $< $@", ) for [ file, target, ] in prebuiltStyles] # List of targets which generate the re-rooted stylesheet files. prebuiltStyleTargets = ["%s_prebuilt" % file for [ file, _, ] in prebuiltStyles] sass_library( name = "sass_lib", srcs = ["_index.scss"], deps = CDK_SCSS_LIBS, ) # Creates the @angular/cdk package published to npm. ng_package( name = "npm_package", package_name = "@angular/cdk", srcs = [ "package.json", ":sass_lib", ] + prebuiltStyleTargets + CDK_SCSS_LIBS, nested_packages = [ "//src/cdk/schematics:npm_package", ] + select({ "//:snapshot_adev_assets": [":adev_assets"], "//conditions:default": [], }), replace_prefixes = { "adev_assets/": "_adev_assets/", }, tags = ["release-package"], visibility = [ "//:__pkg__", "//goldens:__pkg__", "//integration:__subpackages__", ], deps = CDK_TARGETS, ) filegroup( name = "overviews", # Only secondary entry-points declare overview files currently. Entry-points # which contain a slash are not in the top-level and do not have an overview. srcs = ["//src/cdk/%s:overview" % ep for ep in CDK_ENTRYPOINTS if not "/" in ep], ) copy_to_directory( name = "adev_assets", srcs = [ "//src/cdk/drag-drop:json_api", "//src/cdk/testing:json_api", "//src/cdk/testing/protractor:json_api", "//src/cdk/testing/selenium-webdriver:json_api", "//src/cdk/testing/testbed:json_api", ], replace_prefixes = { "**/": "", }, )