Skip to content

Commit 5660d05

Browse files
committed
build: migrate @angular/cli to npm_package
This allows this package to be used in the pnpm workspace, and is a step further with the `rules_js` migration.
1 parent 0b8a458 commit 5660d05

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

packages/angular/cli/BUILD.bazel

+19-20
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,27 @@
44
# found in the LICENSE file at https://angular.dev/license
55

66
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
7-
load("//tools:defaults.bzl", "pkg_npm")
8-
load("//tools:interop.bzl", "ts_project")
7+
load("//tools:defaults2.bzl", "npm_package", "ts_project")
98
load("//tools:ng_cli_schema_generator.bzl", "cli_json_schema")
109
load("//tools:ts_json_schema.bzl", "ts_json_schema")
1110

1211
licenses(["notice"])
1312

1413
package(default_visibility = ["//visibility:public"])
1514

15+
RUNTIME_ASSETS = glob(
16+
include = [
17+
"bin/**/*",
18+
"src/**/*.md",
19+
"src/**/*.json",
20+
],
21+
exclude = [
22+
"lib/config/workspace-schema.json",
23+
],
24+
) + [
25+
"//packages/angular/cli:lib/config/schema.json",
26+
]
27+
1628
ts_project(
1729
name = "angular-cli",
1830
srcs = glob(
@@ -28,18 +40,7 @@ ts_project(
2840
"//packages/angular/cli:lib/config/workspace-schema.ts",
2941
"//packages/angular/cli:src/commands/update/schematic/schema.ts",
3042
],
31-
data = glob(
32-
include = [
33-
"bin/**/*",
34-
"src/**/*.md",
35-
"src/**/*.json",
36-
],
37-
exclude = [
38-
"lib/config/workspace-schema.json",
39-
],
40-
) + [
41-
"//packages/angular/cli:lib/config/schema.json",
42-
],
43+
data = RUNTIME_ASSETS,
4344
module_name = "@angular/cli",
4445
deps = [
4546
"//:root_modules/@angular/core",
@@ -159,8 +160,8 @@ genrule(
159160
cmd = "cp $(execpath //:LICENSE) $@",
160161
)
161162

162-
pkg_npm(
163-
name = "npm_package",
163+
npm_package(
164+
name = "pkg",
164165
pkg_deps = [
165166
"//packages/angular_devkit/architect:package.json",
166167
"//packages/angular_devkit/build_angular:package.json",
@@ -170,11 +171,9 @@ pkg_npm(
170171
"//packages/schematics/angular:package.json",
171172
],
172173
tags = ["release-package"],
173-
deps = [
174+
deps = RUNTIME_ASSETS + [
174175
":README.md",
175-
":angular-cli",
176+
":angular-cli_rjs",
176177
":license",
177-
":src/commands/update/schematic/collection.json",
178-
":src/commands/update/schematic/schema.json",
179178
],
180179
)

0 commit comments

Comments
 (0)