Skip to content

Commit 92c7674

Browse files
josephperrottdgp1130
authored andcommitted
build: migrate @angular-devkit/schematics-cli to npm_package
This allows us to use the package in the RJS pnpm workspace.
1 parent 8ba6b28 commit 92c7674

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

packages/angular_devkit/schematics_cli/BUILD.bazel

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
2-
load("//tools:defaults.bzl", "pkg_npm")
3-
load("//tools:interop.bzl", "ts_project")
2+
load("//tools:defaults2.bzl", "npm_package", "ts_project")
43
load("//tools:ts_json_schema.bzl", "ts_json_schema")
54

65
# Copyright Google Inc. All Rights Reserved.
@@ -11,6 +10,19 @@ licenses(["notice"])
1110

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

13+
RUNTIME_ASSETS = [
14+
"blank/schema.json",
15+
"collection.json",
16+
"package.json",
17+
"schematic/schema.json",
18+
] + glob(
19+
include = [
20+
"blank/project-files/**/*",
21+
"blank/schematic-files/**/*",
22+
"schematic/files/**/*",
23+
],
24+
)
25+
1426
# @angular-devkit/schematics-cli
1527
ts_project(
1628
name = "schematics_cli",
@@ -29,18 +41,7 @@ ts_project(
2941
"//packages/angular_devkit/schematics_cli:blank/schema.ts",
3042
"//packages/angular_devkit/schematics_cli:schematic/schema.ts",
3143
],
32-
data = [
33-
"blank/schema.json",
34-
"collection.json",
35-
"package.json",
36-
"schematic/schema.json",
37-
] + glob(
38-
include = [
39-
"blank/project-files/**/*",
40-
"blank/schematic-files/**/*",
41-
"schematic/files/**/*",
42-
],
43-
),
44+
data = RUNTIME_ASSETS,
4445
module_name = "@angular-devkit/schematics-cli",
4546
deps = [
4647
"//:root_modules/@inquirer/prompts",
@@ -96,16 +97,16 @@ genrule(
9697
cmd = "cp $(execpath //:LICENSE) $@",
9798
)
9899

99-
pkg_npm(
100-
name = "npm_package",
100+
npm_package(
101+
name = "pkg",
101102
pkg_deps = [
102103
"//packages/angular_devkit/schematics:package.json",
103104
"//packages/angular_devkit/core:package.json",
104105
],
105106
tags = ["release-package"],
106-
deps = [
107+
deps = RUNTIME_ASSETS + [
107108
":README.md",
108109
":license",
109-
":schematics_cli",
110+
":schematics_cli_rjs",
110111
],
111112
)

0 commit comments

Comments
 (0)