mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
* Removes `interop_deps` from the `ts_project` interop macro. * Keeps `_rjs` suffix for now as we still need the interop targets for e.g. `jasmine_node_test` and the `rules_nodejs` linker. In follow-ups we can remove the suffix, and interop layer.
112 lines
2.9 KiB
Python
112 lines
2.9 KiB
Python
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
|
|
load("//tools:defaults.bzl", "pkg_npm")
|
|
load("//tools:interop.bzl", "ts_project")
|
|
load("//tools:ts_json_schema.bzl", "ts_json_schema")
|
|
|
|
# Copyright Google Inc. All Rights Reserved.
|
|
#
|
|
# Use of this source code is governed by an MIT-style license that can be
|
|
# found in the LICENSE file at https://angular.dev/license
|
|
licenses(["notice"])
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
# @angular-devkit/schematics-cli
|
|
ts_project(
|
|
name = "schematics_cli",
|
|
srcs = glob(
|
|
include = ["**/*.ts"],
|
|
exclude = [
|
|
"**/*_spec.ts",
|
|
"schematic/files/**",
|
|
"blank/project-files/**",
|
|
"blank/schematic-files/**",
|
|
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
|
|
"node_modules/**",
|
|
],
|
|
) + [
|
|
# These files are generated from the JSON schema
|
|
"//packages/angular_devkit/schematics_cli:blank/schema.ts",
|
|
"//packages/angular_devkit/schematics_cli:schematic/schema.ts",
|
|
],
|
|
data = [
|
|
"blank/schema.json",
|
|
"collection.json",
|
|
"package.json",
|
|
"schematic/schema.json",
|
|
] + glob(
|
|
include = [
|
|
"blank/project-files/**/*",
|
|
"blank/schematic-files/**/*",
|
|
"schematic/files/**/*",
|
|
],
|
|
),
|
|
module_name = "@angular-devkit/schematics-cli",
|
|
deps = [
|
|
"//:root_modules/@inquirer/prompts",
|
|
"//:root_modules/@types/node",
|
|
"//:root_modules/@types/yargs-parser",
|
|
"//:root_modules/ansi-colors",
|
|
"//:root_modules/symbol-observable",
|
|
"//:root_modules/yargs-parser",
|
|
"//packages/angular_devkit/core:core_rjs",
|
|
"//packages/angular_devkit/core/node:node_rjs",
|
|
"//packages/angular_devkit/schematics:schematics_rjs",
|
|
"//packages/angular_devkit/schematics/tasks:tasks_rjs",
|
|
"//packages/angular_devkit/schematics/tools:tools_rjs",
|
|
],
|
|
)
|
|
|
|
ts_project(
|
|
name = "schematics_cli_test_lib",
|
|
testonly = True,
|
|
srcs = glob(
|
|
include = [
|
|
"bin/**/*_spec.ts",
|
|
],
|
|
),
|
|
deps = [
|
|
":schematics_cli_rjs",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "schematics_cli_test",
|
|
srcs = [":schematics_cli_test_lib"],
|
|
data = [
|
|
# The package is loaded at runtime within the tests
|
|
":schematics_cli",
|
|
],
|
|
)
|
|
|
|
ts_json_schema(
|
|
name = "blank_schema",
|
|
src = "blank/schema.json",
|
|
)
|
|
|
|
ts_json_schema(
|
|
name = "schematic_schema",
|
|
src = "schematic/schema.json",
|
|
)
|
|
|
|
genrule(
|
|
name = "license",
|
|
srcs = ["//:LICENSE"],
|
|
outs = ["LICENSE"],
|
|
cmd = "cp $(execpath //:LICENSE) $@",
|
|
)
|
|
|
|
pkg_npm(
|
|
name = "npm_package",
|
|
pkg_deps = [
|
|
"//packages/angular_devkit/schematics:package.json",
|
|
"//packages/angular_devkit/core:package.json",
|
|
],
|
|
tags = ["release-package"],
|
|
deps = [
|
|
":README.md",
|
|
":license",
|
|
":schematics_cli",
|
|
],
|
|
)
|