mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +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.
93 lines
2.6 KiB
Python
93 lines
2.6 KiB
Python
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
|
|
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
|
|
load("//tools:defaults.bzl", "pkg_npm")
|
|
load("//tools:interop.bzl", "ts_project")
|
|
|
|
# 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
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
licenses(["notice"])
|
|
|
|
# @angular-devkit/schematics
|
|
|
|
ts_project(
|
|
name = "schematics",
|
|
srcs = glob(
|
|
include = ["src/**/*.ts"],
|
|
exclude = [
|
|
"src/**/*_spec.ts",
|
|
],
|
|
) + ["index.ts"],
|
|
data = [
|
|
"package.json",
|
|
],
|
|
module_name = "@angular-devkit/schematics",
|
|
deps = [
|
|
"//:root_modules/@types/node",
|
|
"//:root_modules/jsonc-parser",
|
|
"//:root_modules/magic-string",
|
|
"//:root_modules/rxjs",
|
|
"//packages/angular_devkit/core:core_rjs",
|
|
"//packages/angular_devkit/core/node:node_rjs", # TODO: get rid of this for 6.0
|
|
],
|
|
)
|
|
|
|
ts_project(
|
|
name = "schematics_test_lib",
|
|
testonly = True,
|
|
srcs = glob(["src/**/*_spec.ts"]),
|
|
deps = [
|
|
":schematics",
|
|
"//:root_modules/@types/jasmine",
|
|
"//:root_modules/rxjs",
|
|
"//packages/angular_devkit/core:core_rjs",
|
|
"//packages/angular_devkit/core/node:node_rjs",
|
|
"//packages/angular_devkit/schematics/testing:testing_rjs",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "schematics_test",
|
|
deps = [":schematics_test_lib"],
|
|
)
|
|
|
|
genrule(
|
|
name = "license",
|
|
srcs = ["//:LICENSE"],
|
|
outs = ["LICENSE"],
|
|
cmd = "cp $(execpath //:LICENSE) $@",
|
|
)
|
|
|
|
pkg_npm(
|
|
name = "npm_package",
|
|
pkg_deps = [
|
|
"//packages/angular_devkit/core:package.json",
|
|
],
|
|
tags = ["release-package"],
|
|
deps = [
|
|
":README.md",
|
|
":collection-schema.json",
|
|
":license",
|
|
":schematics",
|
|
"//packages/angular_devkit/schematics/tasks",
|
|
"//packages/angular_devkit/schematics/tasks:package.json",
|
|
"//packages/angular_devkit/schematics/testing",
|
|
"//packages/angular_devkit/schematics/testing:package.json",
|
|
"//packages/angular_devkit/schematics/tools:package.json",
|
|
],
|
|
)
|
|
|
|
api_golden_test_npm_package(
|
|
name = "schematics_api",
|
|
data = [
|
|
":npm_package",
|
|
"//goldens:public-api",
|
|
],
|
|
golden_dir = "angular_cli/goldens/public-api/angular_devkit/schematics",
|
|
npm_package = "angular_cli/packages/angular_devkit/schematics/npm_package",
|
|
types = ["@npm//@types/node"],
|
|
)
|