forked from angular/angular
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathBUILD.bazel
More file actions
89 lines (77 loc) · 2.5 KB
/
BUILD.bazel
File metadata and controls
89 lines (77 loc) · 2.5 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
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
load("@aspect_rules_js//js:defs.bzl", "js_library")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@devinfra//bazel/validation:defs.bzl", "validate_ts_version_matching")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//tools:defaults.bzl", "copy_to_bin")
package(default_visibility = ["//visibility:public"])
exports_files([
"LICENSE",
"karma-js.conf.js",
"browser-providers.conf.js",
"package.json",
])
npm_link_all_packages(
name = "node_modules",
)
filegroup(
# filegroup is needed so that this package.json file can be a dep
# in a js_library target, which doesn't allow source file deps
name = "package_json",
srcs = ["package.json"],
)
validate_ts_version_matching(
module_lock_file = "MODULE.bazel.lock",
package_json = "package.json",
)
alias(
name = "tsconfig.json",
actual = "//packages:tsconfig-build.json",
)
js_library(
name = "browser-providers",
srcs = [
"browser-providers.conf.d.ts",
"browser-providers.conf.js",
],
)
copy_to_bin(
name = "angularjs_scripts",
srcs = [
# We also declare the unminified AngularJS files since these can be used for
# local debugging (e.g. see: packages/upgrade/test/common/test_helpers.ts)
"//:node_modules/angular-1.5",
"//:node_modules/angular-1.6",
"//:node_modules/angular-1.7",
"//:node_modules/angular-mocks-1.5",
"//:node_modules/angular-mocks-1.6",
"//:node_modules/angular-mocks-1.7",
"//:node_modules/angular-mocks-1.8",
"//:node_modules/angular-1.8",
],
)
# Detect if the build is running under --stamp
config_setting(
name = "stamp",
values = {"stamp": "true"},
)
alias(
name = "sauce_connect",
actual = select({
"@devinfra//bazel/constraints:linux_x64": "@sauce_connect_linux_amd64//:bin/sc",
"@devinfra//bazel/constraints:macos_x64": "@sauce_connect_mac//:bin/sc",
"@devinfra//bazel/constraints:macos_arm64": "@sauce_connect_mac//:bin/sc",
}),
)
# When enabled, this flag substitutes dependency versions with snapshot repositories
# for all packages in this repository. Note that this does not apply to peer
# dependencies, as they must be installed directly.
bool_flag(
name = "enable_language_server_snapshot_repo_deps",
build_setting_default = False,
)
config_setting(
name = "language_server_package_json_use_snapshot_repo_deps",
flag_values = {
":enable_language_server_snapshot_repo_deps": "true",
},
)