Skip to content

Commit e182d15

Browse files
josephperrottdgp1130
authored andcommitted
build: migrate @angular/pwa to npm_package
This allows us to use the package in the RJS pnpm workspace.
1 parent a7155f6 commit e182d15

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

packages/angular/pwa/BUILD.bazel

+18-14
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,32 @@
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:ts_json_schema.bzl", "ts_json_schema")
109

1110
licenses(["notice"])
1211

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

14+
RUNTIME_ASSETS = glob(
15+
include = [
16+
"pwa/*.js",
17+
"pwa/*.mjs",
18+
"pwa/files/**/*",
19+
],
20+
) + [
21+
"package.json",
22+
"collection.json",
23+
"pwa/schema.json",
24+
]
25+
1526
ts_project(
1627
name = "pwa",
1728
srcs = [
1829
"pwa/index.ts",
1930
"//packages/angular/pwa:pwa/schema.ts",
2031
],
21-
data = [
22-
"collection.json",
23-
"pwa/schema.json",
24-
] + glob(
25-
include = [
26-
"pwa/files/**/*",
27-
],
28-
),
32+
data = RUNTIME_ASSETS,
2933
module_name = "@angular/pwa",
3034
deps = [
3135
"//:root_modules/@types/node",
@@ -63,16 +67,16 @@ genrule(
6367
cmd = "cp $(execpath //:LICENSE) $@",
6468
)
6569

66-
pkg_npm(
67-
name = "npm_package",
70+
npm_package(
71+
name = "pkg",
6872
pkg_deps = [
6973
"//packages/angular_devkit/schematics:package.json",
7074
"//packages/schematics/angular:package.json",
7175
],
7276
tags = ["release-package"],
73-
deps = [
77+
deps = RUNTIME_ASSETS + [
7478
":README.md",
7579
":license",
76-
":pwa",
80+
":pwa_rjs",
7781
],
7882
)

0 commit comments

Comments
 (0)