1
- # TODO: Investigate bzlmod and use it where possible.
1
+ """Rules/toolchains for components with Bazel."""
2
2
3
3
module (
4
- name = "angular_material" ,
5
- )
4
+ name = "components" ,
5
+ )
6
+
7
+ bazel_dep (name = "yq.bzl" , version = "0.2.0" )
8
+ bazel_dep (name = "rules_nodejs" , version = "6.5.0" )
9
+ bazel_dep (name = "aspect_rules_js" , version = "2.4.2" )
10
+ bazel_dep (name = "rules_pkg" , version = "1.1.0" )
11
+ bazel_dep (name = "tar.bzl" , version = "0.5.1" )
12
+ bazel_dep (name = "aspect_bazel_lib" , version = "2.19.3" )
13
+ bazel_dep (name = "aspect_rules_esbuild" , version = "0.22.1" )
14
+ bazel_dep (name = "aspect_rules_jasmine" , version = "2.0.0" )
15
+ bazel_dep (name = "platforms" , version = "1.0.0" )
16
+ bazel_dep (name = "aspect_rules_ts" , version = "3.6.3" )
17
+ bazel_dep (name = "bazel_skylib" , version = "1.8.1" )
18
+ bazel_dep (name = "rules_browsers" )
19
+ git_override (
20
+ module_name = "rules_browsers" ,
21
+ commit = "93467ec31f55d87d50b59928a6461cd6cbf241c2" ,
22
+ remote = "https://github.com/devversion/rules_browsers.git" ,
23
+ )
24
+
25
+ bazel_dep (name = "rules_sass" )
26
+ git_override (
27
+ module_name = "rules_sass" ,
28
+ commit = "76078d5e9776a0080dcee496e90b88d8a6179c19" ,
29
+ remote = "https://github.com/devversion/rules_sass.git" ,
30
+ )
31
+
32
+ bazel_dep (name = "rules_angular" )
33
+ git_override (
34
+ module_name = "rules_angular" ,
35
+ commit = "a957283cdef0ade1fc6d1d7404f14577cebd3642" ,
36
+ remote = "https://github.com/devversion/rules_angular.git" ,
37
+ )
38
+
39
+ bazel_dep (name = "devinfra" )
40
+ git_override (
41
+ module_name = "devinfra" ,
42
+ commit = "f27fc330e9ebdd07ca713aff3c25a553cb824e37" ,
43
+ remote = "https://github.com/angular/dev-infra.git" ,
44
+ )
45
+
46
+ yq = use_extension ("@yq.bzl//yq:extensions.bzl" , "yq" )
47
+ use_repo (yq , "yq_toolchains" )
48
+
49
+ rules_ts_ext = use_extension ("@aspect_rules_ts//ts:extensions.bzl" , "ext" )
50
+ rules_ts_ext .deps (
51
+ name = "components_npm_typescript" ,
52
+ # Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.2 | jq -r '.dist.integrity'
53
+ ts_integrity = "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==" ,
54
+ ts_version_from = "//:package.json" ,
55
+ )
56
+ use_repo (rules_ts_ext , ** {"npm_typescript" : "components_npm_typescript" })
57
+
58
+ node = use_extension ("@rules_nodejs//nodejs:extensions.bzl" , "node" )
59
+ node .toolchain (node_version = "22.12.0" )
60
+ use_repo (node , "nodejs_toolchains" )
61
+
62
+ pnpm = use_extension ("@aspect_rules_js//npm:extensions.bzl" , "pnpm" )
63
+ use_repo (pnpm , "pnpm" )
64
+
65
+ npm = use_extension ("@aspect_rules_js//npm:extensions.bzl" , "npm" )
66
+ npm .npm_translate_lock (
67
+ name = "npm" ,
68
+ custom_postinstalls = {
69
+ "@angular/animations" : "node ../../@nginfra/angular-linking/index.mjs" ,
70
+ "@angular/common" : "node ../../@nginfra/angular-linking/index.mjs" ,
71
+ "@angular/forms" : "node ../../@nginfra/angular-linking/index.mjs" ,
72
+ "@angular/localize" : "node ../../@nginfra/angular-linking/index.mjs" ,
73
+ "@angular/platform-browser" : "node ../../@nginfra/angular-linking/index.mjs" ,
74
+ "@angular/platform-server" : "node ../../@nginfra/angular-linking/index.mjs" ,
75
+ "@angular/router" : "node ../../@nginfra/angular-linking/index.mjs" ,
76
+ },
77
+ data = [
78
+ "//:package.json" ,
79
+ "//:pnpm-workspace.yaml" ,
80
+ "//integration:package.json" ,
81
+ "//src/cdk:package.json" ,
82
+ "//src/cdk-experimental:package.json" ,
83
+ "//src/components-examples:package.json" ,
84
+ "//src/dev-app:package.json" ,
85
+ "//src/e2e-app:package.json" ,
86
+ "//src/google-maps:package.json" ,
87
+ "//src/material:package.json" ,
88
+ "//src/material-date-fns-adapter:package.json" ,
89
+ "//src/material-experimental:package.json" ,
90
+ "//src/material-luxon-adapter:package.json" ,
91
+ "//src/material-moment-adapter:package.json" ,
92
+ "//src/universal-app:package.json" ,
93
+ "//src/youtube-player:package.json" ,
94
+ ],
95
+ npmrc = "//:.npmrc" ,
96
+ package_visibility = {
97
+ "@angular/cdk" : [
98
+ "//integration:__subpackages__" ,
99
+ "//docs:__subpackages__" ,
100
+ ],
101
+ "@angular/cdk-experimental" : [
102
+ "//integration:__subpackages__" ,
103
+ "//docs:__subpackages__" ,
104
+ ],
105
+ "@angular/material" : [
106
+ "//integration:__subpackages__" ,
107
+ "//docs:__subpackages__" ,
108
+ ],
109
+ "@angular/material-experimental" : [
110
+ "//integration:__subpackages__" ,
111
+ "//docs:__subpackages__" ,
112
+ ],
113
+ "@angular/google-maps" : [
114
+ "//integration:__subpackages__" ,
115
+ "//docs:__subpackages__" ,
116
+ ],
117
+ "@angular/youtube-player" : [
118
+ "//integration:__subpackages__" ,
119
+ "//docs:__subpackages__" ,
120
+ ],
121
+ "@angular/material-moment-adapter" : [
122
+ "//integration:__subpackages__" ,
123
+ "//docs:__subpackages__" ,
124
+ ],
125
+ "@angular/material-date-fns-adapter" : [
126
+ "//integration:__subpackages__" ,
127
+ "//docs:__subpackages__" ,
128
+ ],
129
+ "@angular/material-luxon-adapter" : [
130
+ "//integration:__subpackages__" ,
131
+ "//docs:__subpackages__" ,
132
+ ],
133
+ },
134
+ pnpm_lock = "//:pnpm-lock.yaml" ,
135
+ verify_node_modules_ignored = "//:.bazelignore" ,
136
+ )
137
+ use_repo (npm , "npm" )
138
+
139
+ rules_angular = use_extension ("@rules_angular//setup:extensions.bzl" , "rules_angular" )
140
+ rules_angular .setup (
141
+ name = "components_rules_angular_configurable_deps" ,
142
+ angular_compiler_cli = "//:node_modules/@angular/compiler-cli" ,
143
+ typescript = "//:node_modules/typescript" ,
144
+ )
145
+ use_repo (rules_angular , ** {"rules_angular_configurable_deps" : "components_rules_angular_configurable_deps" })
0 commit comments