forked from angular/components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pkg-externals.bzl
85 lines (77 loc) · 2.94 KB
/
pkg-externals.bzl
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
85
load("//src/cdk:config.bzl", "CDK_ENTRYPOINTS")
load("//src/cdk-experimental:config.bzl", "CDK_EXPERIMENTAL_ENTRYPOINTS")
load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_ENTRYPOINTS")
load(
"//src/material-experimental:config.bzl",
"MATERIAL_EXPERIMENTAL_ENTRYPOINTS",
"MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS",
)
load("//:packages.bzl", "MDC_PACKAGES")
# Base list of externals which should not be bundled into the APF package output.
# Note that we want to disable sorting of the externals as we manually group entries.
# buildifier: disable=unsorted-list-items
PKG_EXTERNALS = [
# Framework packages.
"@angular/animations",
"@angular/common",
"@angular/common/http",
"@angular/common/http/testing",
"@angular/common/testing",
"@angular/core",
"@angular/core/testing",
"@angular/forms",
"@angular/platform-browser",
"@angular/platform-browser-dynamic",
"@angular/platform-browser-dynamic/testing",
"@angular/platform-browser/animations",
"@angular/platform-server",
"@angular/router",
# Primary entry-points in the project.
"@angular/cdk",
"@angular/cdk-experimental",
"@angular/google-maps",
"@angular/material",
"@angular/material-experimental",
"@angular/material-moment-adapter",
"@angular/material-luxon-adapter",
"@angular/material-date-fns-adapter",
"@angular/youtube-player",
# Third-party libraries.
"kagekiri",
"moment",
"moment/locale/fr",
"moment/locale/ja",
"luxon",
"date-fns",
"protractor",
"rxjs",
"rxjs/operators",
"selenium-webdriver",
]
# Configures the externals for all MDC packages.
def setup_mdc_externals():
for pkg_name in MDC_PACKAGES:
PKG_EXTERNALS.append(pkg_name)
# Creates externals for a given package and its entry-points.
def setup_entry_point_externals(packageName, entryPoints):
PKG_EXTERNALS.extend(["@angular/%s/%s" % (packageName, ep) for ep in entryPoints])
setup_mdc_externals()
setup_entry_point_externals("cdk", CDK_ENTRYPOINTS)
setup_entry_point_externals("cdk-experimental", CDK_EXPERIMENTAL_ENTRYPOINTS)
setup_entry_point_externals("material", MATERIAL_ENTRYPOINTS + MATERIAL_TESTING_ENTRYPOINTS)
setup_entry_point_externals(
"material-experimental",
MATERIAL_EXPERIMENTAL_ENTRYPOINTS + MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS,
)
# External module names in the examples package. Individual examples are grouped
# by package and component, so we add configure such entry-points as external.
setup_entry_point_externals("components-examples/cdk", CDK_ENTRYPOINTS)
setup_entry_point_externals("components-examples/cdk-experimental", CDK_EXPERIMENTAL_ENTRYPOINTS)
setup_entry_point_externals(
"components-examples/material",
MATERIAL_ENTRYPOINTS + MATERIAL_TESTING_ENTRYPOINTS,
)
setup_entry_point_externals(
"components-examples/material-experimental",
MATERIAL_EXPERIMENTAL_ENTRYPOINTS + MATERIAL_EXPERIMENTAL_TESTING_ENTRYPOINTS,
)