-
Notifications
You must be signed in to change notification settings - Fork 12k
/
BUILD.bazel
93 lines (79 loc) · 2.04 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
85
86
87
88
89
90
91
92
93
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
# Copyright Google Inc. All Rights Reserved.
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.dev/license
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin")
load("@npm//@bazel/concatjs:index.bzl", "ts_config")
load("@npm2//:defs.bzl", "npm_link_all_packages")
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
exports_files([
"LICENSE",
"tsconfig.json",
"tsconfig-test.json",
"tsconfig-build-ng.json",
"tsconfig-build.json",
"package.json",
])
npm_link_all_packages(
name = "root_modules",
)
rules_js_tsconfig(
name = "build-tsconfig",
src = "tsconfig-build.json",
deps = [
"tsconfig.json",
"//:root_modules/@types/node",
],
)
rules_js_tsconfig(
name = "test-tsconfig",
src = "tsconfig-test.json",
deps = [
"tsconfig.json",
"//:root_modules/@types/node",
],
)
# Files required by e2e tests
copy_to_bin(
name = "config-files",
srcs = [
"package.json",
],
)
# Detect if the build is running under --stamp
config_setting(
name = "stamp",
values = {"stamp": "true"},
)
# If set will replace dependency versions with tarballs for packages in this repo
bool_flag(
name = "enable_package_json_tar_deps",
build_setting_default = False,
)
config_setting(
name = "package_json_use_tar_deps",
flag_values = {
":enable_package_json_tar_deps": "true",
},
)
# If set will replace dependency versions with snapshot repos for packages in this repo
bool_flag(
name = "enable_snapshot_repo_deps",
build_setting_default = False,
)
config_setting(
name = "package_json_use_snapshot_repo_deps",
flag_values = {
":enable_snapshot_repo_deps": "true",
},
)
ts_config(
name = "tsconfig-build-ng",
src = "tsconfig-build-ng.json",
deps = [
":tsconfig.json",
],
)