-
Notifications
You must be signed in to change notification settings - Fork 23
/
pkg-externals.bzl
69 lines (62 loc) · 2.27 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
"""
Package version management. These are used for replacement in built bundles.
"""
load("//src/angular:config.bzl", "ANGULAR_ENTRYPOINTS")
load("//src/journey-maps:config.bzl", "JOURNEY_MAPS_ENTRYPOINTS")
# 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",
"@angular/cdk",
"@angular/cdk/a11y",
"@angular/cdk/accordion",
"@angular/cdk/bidi",
"@angular/cdk/clipboard",
"@angular/cdk/coercion",
"@angular/cdk/collections",
"@angular/cdk/drag-drop",
"@angular/cdk/keycodes",
"@angular/cdk/layout",
"@angular/cdk/observers",
"@angular/cdk/overlay",
"@angular/cdk/platform",
"@angular/cdk/portal",
"@angular/cdk/scrolling",
"@angular/cdk/stepper",
"@angular/cdk/table",
"@angular/cdk/text-field",
"@angular/cdk/tree",
# Primary entry-points in the project.
"@sbb-esta/angular",
"@sbb-esta/journey-maps",
# Third-party libraries.
"protractor",
"rxjs",
"rxjs/operators",
"keycloak-js",
"maplibre-gl",
]
# Creates externals for a given package and its entry-points.
def setup_entry_point_externals(packageName, entryPoints):
PKG_EXTERNALS.extend(["@sbb-esta/%s/%s" % (packageName, ep) for ep in entryPoints])
setup_entry_point_externals("angular", ANGULAR_ENTRYPOINTS)
setup_entry_point_externals("journey-maps", JOURNEY_MAPS_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/angular", ANGULAR_ENTRYPOINTS)
setup_entry_point_externals("components-examples/journey-maps", JOURNEY_MAPS_ENTRYPOINTS)