Skip to content

Commit 7687a6a

Browse files
josephperrottdgp1130
authored andcommitted
build: migrate @angular/create to npm_package
This allows us to use the package in the RJS pnpm workspace. (cherry picked from commit a7155f6)
1 parent a0e54de commit 7687a6a

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

packages/angular/create/BUILD.bazel

+18-7
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,25 @@
33
# Use of this source code is governed by an MIT-style license that can be
44
# found in the LICENSE file at https://angular.dev/license
55

6-
load("//tools:defaults.bzl", "pkg_npm")
7-
load("//tools:interop.bzl", "ts_project")
6+
load("//tools:defaults2.bzl", "npm_package", "ts_project")
87

98
licenses(["notice"])
109

10+
RUNTIME_ASSETS = glob(
11+
include = [
12+
"src/*.js",
13+
"src/*.mjs",
14+
],
15+
) + [
16+
"package.json",
17+
]
18+
1119
ts_project(
1220
name = "create",
13-
srcs = ["src/index.ts"],
21+
srcs = glob([
22+
"src/*.ts",
23+
]),
24+
data = RUNTIME_ASSETS,
1425
module_name = "@angular/create",
1526
deps = [
1627
"//:root_modules/@types/node",
@@ -25,16 +36,16 @@ genrule(
2536
cmd = "cp $(execpath //:LICENSE) $@",
2637
)
2738

28-
pkg_npm(
29-
name = "npm_package",
39+
npm_package(
40+
name = "pkg",
3041
pkg_deps = [
3142
"//packages/angular/cli:package.json",
3243
],
3344
tags = ["release-package"],
3445
visibility = ["//visibility:public"],
35-
deps = [
46+
deps = RUNTIME_ASSETS + [
3647
":README.md",
37-
":create",
48+
":create_rjs",
3849
":license",
3950
],
4051
)

0 commit comments

Comments
 (0)