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
+ bazel_dep (name = "rules_sass" )
25
+ git_override (
26
+ module_name = "rules_sass" ,
27
+ commit = "76078d5e9776a0080dcee496e90b88d8a6179c19" ,
28
+ remote = "https://github.com/devversion/rules_sass.git" ,
29
+ )
30
+ bazel_dep (name = "rules_angular" )
31
+ git_override (
32
+ module_name = "rules_angular" ,
33
+ commit = "a957283cdef0ade1fc6d1d7404f14577cebd3642" ,
34
+ remote = "https://github.com/devversion/rules_angular.git" ,
35
+ )
36
+
37
+ bazel_dep (name = "devinfra" )
38
+ git_override (
39
+ module_name = "devinfra" ,
40
+ commit = "7a11f99c467ca5ae4411c27beeec4300e32b616a" ,
41
+ remote = "https://github.com/angular/dev-infra.git" ,
42
+ )
43
+
44
+ yq = use_extension ("@yq.bzl//yq:extensions.bzl" , "yq" )
45
+ use_repo (yq , "yq_toolchains" )
46
+
47
+ rules_ts_ext = use_extension ("@aspect_rules_ts//ts:extensions.bzl" , "ext" )
48
+ rules_ts_ext .deps (
49
+ # Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.2 | jq -r '.dist.integrity'
50
+ ts_integrity = "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==" ,
51
+ ts_version_from = "//:package.json" ,
52
+ name = "components_npm_typescript" ,
53
+ )
54
+ use_repo (rules_ts_ext , ** {"npm_typescript" :"components_npm_typescript" })
55
+
56
+ node = use_extension ("@rules_nodejs//nodejs:extensions.bzl" , "node" )
57
+ node .toolchain (node_version = "22.12.0" )
58
+ use_repo (node , "nodejs_toolchains" )
59
+
60
+ pnpm = use_extension ("@aspect_rules_js//npm:extensions.bzl" , "pnpm" )
61
+ use_repo (pnpm , "pnpm" )
62
+
63
+ npm = use_extension ("@aspect_rules_js//npm:extensions.bzl" , "npm" )
64
+ npm .npm_translate_lock (
65
+ name = "npm" ,
66
+ custom_postinstalls = {
67
+ "@angular/animations" : "node ../../@nginfra/angular-linking/index.mjs" ,
68
+ "@angular/common" : "node ../../@nginfra/angular-linking/index.mjs" ,
69
+ "@angular/forms" : "node ../../@nginfra/angular-linking/index.mjs" ,
70
+ "@angular/localize" : "node ../../@nginfra/angular-linking/index.mjs" ,
71
+ "@angular/platform-browser" : "node ../../@nginfra/angular-linking/index.mjs" ,
72
+ "@angular/platform-server" : "node ../../@nginfra/angular-linking/index.mjs" ,
73
+ "@angular/router" : "node ../../@nginfra/angular-linking/index.mjs" ,
74
+ },
75
+ data = [
76
+ "//:package.json" ,
77
+ "//:pnpm-workspace.yaml" ,
78
+ "//integration:package.json" ,
79
+ "//src/cdk:package.json" ,
80
+ "//src/cdk-experimental:package.json" ,
81
+ "//src/components-examples:package.json" ,
82
+ "//src/dev-app:package.json" ,
83
+ "//src/e2e-app:package.json" ,
84
+ "//src/google-maps:package.json" ,
85
+ "//src/material:package.json" ,
86
+ "//src/material-date-fns-adapter:package.json" ,
87
+ "//src/material-experimental:package.json" ,
88
+ "//src/material-luxon-adapter:package.json" ,
89
+ "//src/material-moment-adapter:package.json" ,
90
+ "//src/universal-app:package.json" ,
91
+ "//src/youtube-player:package.json" ,
92
+ ],
93
+ npmrc = "//:.npmrc" ,
94
+ package_visibility = {
95
+ "@angular/cdk" : [
96
+ "//integration:__subpackages__" ,
97
+ "//docs:__subpackages__" ,
98
+ ],
99
+ "@angular/cdk-experimental" : [
100
+ "//integration:__subpackages__" ,
101
+ "//docs:__subpackages__" ,
102
+ ],
103
+ "@angular/material" : [
104
+ "//integration:__subpackages__" ,
105
+ "//docs:__subpackages__" ,
106
+ ],
107
+ "@angular/material-experimental" : [
108
+ "//integration:__subpackages__" ,
109
+ "//docs:__subpackages__" ,
110
+ ],
111
+ "@angular/google-maps" : [
112
+ "//integration:__subpackages__" ,
113
+ "//docs:__subpackages__" ,
114
+ ],
115
+ "@angular/youtube-player" : [
116
+ "//integration:__subpackages__" ,
117
+ "//docs:__subpackages__" ,
118
+ ],
119
+ "@angular/material-moment-adapter" : [
120
+ "//integration:__subpackages__" ,
121
+ "//docs:__subpackages__" ,
122
+ ],
123
+ "@angular/material-date-fns-adapter" : [
124
+ "//integration:__subpackages__" ,
125
+ "//docs:__subpackages__" ,
126
+ ],
127
+ "@angular/material-luxon-adapter" : [
128
+ "//integration:__subpackages__" ,
129
+ "//docs:__subpackages__" ,
130
+ ],
131
+ },
132
+ pnpm_lock = "//:pnpm-lock.yaml" ,
133
+ verify_node_modules_ignored = "//:.bazelignore" ,
134
+ )
135
+ use_repo (npm , "npm" )
136
+
137
+ rules_angular = use_extension ("@rules_angular//setup:extensions.bzl" , "rules_angular" )
138
+ rules_angular .setup (
139
+ name = "components_rules_angular_configurable_deps" ,
140
+ angular_compiler_cli = "//:node_modules/@angular/compiler-cli" ,
141
+ typescript = "//:node_modules/typescript" ,
142
+ )
143
+ use_repo (rules_angular , ** {"rules_angular_configurable_deps" :"components_rules_angular_configurable_deps" })
0 commit comments