forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD.bazel
84 lines (72 loc) · 2.31 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS")
load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_ENTRYPOINTS")
load("//tools/dgeni:index.bzl", "dgeni_api_docs")
load("//tools:defaults2.bzl", "ts_project")
load("@aspect_rules_js//js:defs.bzl", "js_library")
package(default_visibility = ["//visibility:public"])
cdkApiEntryPoints = CDK_ENTRYPOINTS
materialApiEntryPoints = MATERIAL_ENTRYPOINTS + MATERIAL_TESTING_ENTRYPOINTS
# List that contains all source files that need to be processed by Dgeni.
apiSourceFiles = ["//src/cdk/%s:source-files" % name for name in cdkApiEntryPoints] + \
["//src/material/%s:source-files" % name for name in materialApiEntryPoints]
exports_files([
"bazel-tsconfig-build.json",
"bazel-tsconfig-test.json",
"README.md",
])
copy_to_bin(
name = "package_json",
srcs = ["package.json"],
)
js_library(
name = "esbuild-linked-config",
srcs = ["esbuild-linked.config.mjs"],
)
dgeni_api_docs(
name = "api-docs",
srcs = apiSourceFiles + [
# Add all Angular packages to the sources because some Material exports use
# Angular exports and these should not cause any warnings when Dgeni uses the
# type checker to parse our TypeScript sources.
"//:node_modules/@angular/core",
"//:node_modules/@angular/common",
"//:node_modules/@angular/forms",
"//:node_modules/@angular/animations",
"//:node_modules/@angular/platform-browser",
],
entry_points = {
"cdk": cdkApiEntryPoints,
"material": materialApiEntryPoints,
},
tags = ["docs-package"],
)
ts_project(
name = "dev_mode_types",
srcs = ["dev-mode-types.d.ts"],
)
# TODO(devversion): Look into a replacement.
#ts_config(
# name = "tsec_config",
# src = "tsconfig-tsec.json",
# deps = [
# ":bazel-tsconfig-build.json",
# "//goldens:tsec-exemption.json",
# ],
#)
ts_config(
name = "build-tsconfig",
src = "bazel-tsconfig-build.json",
deps = [
"//:node_modules/tslib",
],
)
ts_config(
name = "test-tsconfig",
src = "bazel-tsconfig-test.json",
deps = [
":build-tsconfig",
"//:node_modules/@types/jasmine",
],
)