/
pkg-externals.bzl
66 lines (60 loc) · 2.24 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
load("//src/core:config.bzl", "CORE_ENTRYPOINTS")
load("//src/ionic:config.bzl", "IONIC_ENTRYPOINTS", "IONIC_TESTING_ENTRYPOINTS")
load("//src/material:config.bzl", "MATERIAL_ENTRYPOINTS", "MATERIAL_TESTING_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/cdk/coercion",
"@angular/cdk/collections",
"@angular/common",
"@angular/common/http",
"@angular/core",
"@angular/forms",
"@angular/material/autocomplete",
"@angular/material/button",
"@angular/material/card",
"@angular/material/checkbox",
"@angular/material/dialog",
"@angular/material/form-field",
"@angular/material/icon",
"@angular/material/input",
"@angular/material/paginator",
"@angular/material/progress-bar",
"@angular/material/radio",
"@angular/material/select",
"@angular/material/sort",
"@angular/material/snack-bar",
"@angular/material/table",
"@angular/material/toolbar",
"@angular/router",
# Primary entry-points in the project.
"@gngt/core",
"@gngt/ionic",
"@gngt/material",
# Third-party libraries.
"@gic/angular",
"@ionic/angular",
"@ionic/core",
"@ngneat/transloco",
"@ngrx/effects",
"@ngrx/store",
"date-fns",
"pouchdb",
"pouchdb-find",
"rxjs",
"rxjs/operators",
"url-parse",
"uuid",
]
# Creates externals for a given package and its entry-points.
def setup_entry_point_externals(packageName, entryPoints):
PKG_EXTERNALS.extend(["@gngt/%s/%s" % (packageName, ep) for ep in entryPoints])
setup_entry_point_externals("core", CORE_ENTRYPOINTS)
setup_entry_point_externals("ionic", IONIC_ENTRYPOINTS + IONIC_TESTING_ENTRYPOINTS)
setup_entry_point_externals("material", MATERIAL_ENTRYPOINTS + MATERIAL_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("gngt-examples/ionic", ["calendar"])
setup_entry_point_externals("gngt-examples/material", ["calendar"])