Skip to content

Commit 0d9a835

Browse files
committed
build: migrate @angular-devkit/schematics-cli to ts_project
The `@angular-devkit/schematics-cli` package has been migrated to the `rules_js` ts_project rule.
1 parent d4a4bc8 commit 0d9a835

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

packages/angular_devkit/schematics_cli/BUILD.bazel

+21-18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
2-
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
2+
load("//tools:defaults.bzl", "pkg_npm")
3+
load("//tools:interop.bzl", "ts_project")
34
load("//tools:ts_json_schema.bzl", "ts_json_schema")
45

56
# Copyright Google Inc. All Rights Reserved.
@@ -11,9 +12,8 @@ licenses(["notice"])
1112
package(default_visibility = ["//visibility:public"])
1213

1314
# @angular-devkit/schematics-cli
14-
ts_library(
15+
ts_project(
1516
name = "schematics_cli",
16-
package_name = "@angular-devkit/schematics-cli",
1717
srcs = glob(
1818
include = ["**/*.ts"],
1919
exclude = [
@@ -25,11 +25,9 @@ ts_library(
2525
"node_modules/**",
2626
],
2727
) + [
28-
# @external_begin
2928
# These files are generated from the JSON schema
3029
"//packages/angular_devkit/schematics_cli:blank/schema.ts",
3130
"//packages/angular_devkit/schematics_cli:schematic/schema.ts",
32-
# @external_end
3331
],
3432
data = [
3533
"blank/schema.json",
@@ -43,24 +41,25 @@ ts_library(
4341
"schematic/files/**/*",
4442
],
4543
),
46-
module_name = "@angular-devkit/schematics-cli",
47-
module_root = "bin/schematics.d.ts",
48-
deps = [
49-
"//packages/angular_devkit/core",
50-
"//packages/angular_devkit/core/node",
44+
interop_deps = [
5145
"//packages/angular_devkit/schematics",
5246
"//packages/angular_devkit/schematics/tasks",
5347
"//packages/angular_devkit/schematics/tools",
54-
"@npm//@inquirer/prompts",
55-
"@npm//@types/node",
56-
"@npm//@types/yargs-parser",
57-
"@npm//ansi-colors",
58-
"@npm//symbol-observable",
59-
"@npm//yargs-parser",
48+
],
49+
module_name = "@angular-devkit/schematics-cli",
50+
deps = [
51+
"//:root_modules/@inquirer/prompts",
52+
"//:root_modules/@types/node",
53+
"//:root_modules/@types/yargs-parser",
54+
"//:root_modules/ansi-colors",
55+
"//:root_modules/symbol-observable",
56+
"//:root_modules/yargs-parser",
57+
"//packages/angular_devkit/core:core_rjs",
58+
"//packages/angular_devkit/core/node:node_rjs",
6059
],
6160
)
6261

63-
ts_library(
62+
ts_project(
6463
name = "schematics_cli_test_lib",
6564
testonly = True,
6665
srcs = glob(
@@ -69,13 +68,17 @@ ts_library(
6968
],
7069
),
7170
deps = [
72-
":schematics_cli",
71+
":schematics_cli_rjs",
7372
],
7473
)
7574

7675
jasmine_node_test(
7776
name = "schematics_cli_test",
7877
srcs = [":schematics_cli_test_lib"],
78+
data = [
79+
# The package is loaded at runtime within the tests
80+
":schematics_cli",
81+
],
7982
)
8083

8184
ts_json_schema(

0 commit comments

Comments
 (0)