-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathBUILD.bazel
More file actions
42 lines (35 loc) · 1.43 KB
/
BUILD.bazel
File metadata and controls
42 lines (35 loc) · 1.43 KB
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
load("@devinfra//bazel/validation:defs.bzl", "validate_ts_version_matching")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//:pkg-externals.bzl", "PKG_EXTERNALS")
load("//src/angular:config.bzl", "ANGULAR_ENTRYPOINTS", "ANGULAR_TESTING_ENTRYPOINTS")
load("//src/angular-experimental:config.bzl", "EXPERIMENTAL_ENTRYPOINTS")
load("//src/journey-maps:config.bzl", "JOURNEY_MAPS_ENTRYPOINTS")
package(default_visibility = ["//visibility:public"])
exports_files([
"package.json",
"pnpm-workspace.yaml",
"LICENSE",
])
npm_link_all_packages(
name = "node_modules",
)
# Target which writes the list of package externals into a JSON file so that the
# Starlark-configured externals (for the NPM package bundling) can be passed to
# the `check-package-externals` Yarn script, which validates our module imports.
genrule(
name = "package_externals",
outs = ["package_externals.json"],
cmd = "echo '%s' > $@" % PKG_EXTERNALS,
)
entry_points = ["angular/%s" % e for e in ANGULAR_ENTRYPOINTS + ANGULAR_TESTING_ENTRYPOINTS] + \
["angular-experimental/%s" % e for e in EXPERIMENTAL_ENTRYPOINTS] + \
["journey-maps/%s" % e for e in JOURNEY_MAPS_ENTRYPOINTS]
genrule(
name = "entry_points_manifest",
outs = ["entry_points_manifest.json"],
cmd = "echo '%s' > $@" % entry_points,
)
validate_ts_version_matching(
module_lock_file = "MODULE.bazel.lock",
package_json = "package.json",
)