mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 18:13:38 +08:00
185 lines
6.0 KiB
Python
185 lines
6.0 KiB
Python
# 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.io/license
|
|
|
|
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
|
|
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
|
|
|
|
# @external_begin
|
|
load("//tools:ts_json_schema.bzl", "ts_json_schema")
|
|
load("//tools:ng_cli_schema_generator.bzl", "cli_json_schema")
|
|
# @external_end
|
|
|
|
licenses(["notice"]) # MIT
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
ts_library(
|
|
name = "angular-cli",
|
|
package_name = "@angular/cli",
|
|
srcs = glob(
|
|
include = ["**/*.ts"],
|
|
exclude = [
|
|
"**/*_spec.ts",
|
|
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
|
|
"node_modules/**",
|
|
],
|
|
) + [
|
|
# @external_begin
|
|
# These files are generated from the JSON schema
|
|
"//packages/angular/cli:lib/config/workspace-schema.ts",
|
|
"//packages/angular/cli:src/commands/update/schematic/schema.ts",
|
|
# @external_end
|
|
],
|
|
data = glob(
|
|
include = [
|
|
"bin/**/*",
|
|
"**/*.json",
|
|
"**/*.md",
|
|
],
|
|
exclude = [
|
|
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
|
|
"node_modules/**",
|
|
"lib/config/workspace-schema.json",
|
|
],
|
|
) + [
|
|
"//packages/angular/cli:lib/config/schema.json",
|
|
],
|
|
module_name = "@angular/cli",
|
|
# strict_checks = False,
|
|
deps = [
|
|
"//packages/angular_devkit/architect",
|
|
"//packages/angular_devkit/architect/node",
|
|
"//packages/angular_devkit/core",
|
|
"//packages/angular_devkit/core/node",
|
|
"//packages/angular_devkit/schematics",
|
|
"//packages/angular_devkit/schematics/tasks",
|
|
"//packages/angular_devkit/schematics/tools",
|
|
"@npm//@angular/core",
|
|
"@npm//@types/debug",
|
|
"@npm//@types/ini",
|
|
"@npm//@types/inquirer",
|
|
"@npm//@types/node",
|
|
"@npm//@types/npm-package-arg",
|
|
"@npm//@types/pacote",
|
|
"@npm//@types/resolve",
|
|
"@npm//@types/semver",
|
|
"@npm//@types/uuid",
|
|
"@npm//@types/yargs",
|
|
"@npm//@types/yarnpkg__lockfile",
|
|
"@npm//@yarnpkg/lockfile",
|
|
"@npm//ansi-colors",
|
|
"@npm//ini",
|
|
"@npm//jsonc-parser",
|
|
"@npm//npm-package-arg",
|
|
"@npm//open",
|
|
"@npm//ora",
|
|
"@npm//pacote",
|
|
"@npm//semver",
|
|
"@npm//yargs",
|
|
],
|
|
)
|
|
|
|
# @external_begin
|
|
CLI_SCHEMA_DATA = [
|
|
"//packages/angular_devkit/build_angular:src/builders/app-shell/schema.json",
|
|
"//packages/angular_devkit/build_angular:src/builders/browser/schema.json",
|
|
"//packages/angular_devkit/build_angular:src/builders/dev-server/schema.json",
|
|
"//packages/angular_devkit/build_angular:src/builders/extract-i18n/schema.json",
|
|
"//packages/angular_devkit/build_angular:src/builders/karma/schema.json",
|
|
"//packages/angular_devkit/build_angular:src/builders/ng-packagr/schema.json",
|
|
"//packages/angular_devkit/build_angular:src/builders/protractor/schema.json",
|
|
"//packages/angular_devkit/build_angular:src/builders/server/schema.json",
|
|
"//packages/schematics/angular:app-shell/schema.json",
|
|
"//packages/schematics/angular:application/schema.json",
|
|
"//packages/schematics/angular:class/schema.json",
|
|
"//packages/schematics/angular:component/schema.json",
|
|
"//packages/schematics/angular:directive/schema.json",
|
|
"//packages/schematics/angular:enum/schema.json",
|
|
"//packages/schematics/angular:guard/schema.json",
|
|
"//packages/schematics/angular:interceptor/schema.json",
|
|
"//packages/schematics/angular:interface/schema.json",
|
|
"//packages/schematics/angular:library/schema.json",
|
|
"//packages/schematics/angular:module/schema.json",
|
|
"//packages/schematics/angular:ng-new/schema.json",
|
|
"//packages/schematics/angular:pipe/schema.json",
|
|
"//packages/schematics/angular:resolver/schema.json",
|
|
"//packages/schematics/angular:service/schema.json",
|
|
"//packages/schematics/angular:service-worker/schema.json",
|
|
"//packages/schematics/angular:web-worker/schema.json",
|
|
]
|
|
|
|
cli_json_schema(
|
|
name = "cli_config_schema",
|
|
src = "lib/config/workspace-schema.json",
|
|
out = "lib/config/schema.json",
|
|
data = CLI_SCHEMA_DATA,
|
|
)
|
|
|
|
ts_json_schema(
|
|
name = "cli_schema",
|
|
src = "lib/config/workspace-schema.json",
|
|
data = CLI_SCHEMA_DATA,
|
|
)
|
|
|
|
ts_json_schema(
|
|
name = "update_schematic_schema",
|
|
src = "src/commands/update/schematic/schema.json",
|
|
)
|
|
# @external_end
|
|
|
|
ts_library(
|
|
name = "angular-cli_test_lib",
|
|
testonly = True,
|
|
srcs = glob(
|
|
include = ["**/*_spec.ts"],
|
|
exclude = [
|
|
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
|
|
"node_modules/**",
|
|
],
|
|
),
|
|
# strict_checks = False,
|
|
deps = [
|
|
":angular-cli",
|
|
"//packages/angular_devkit/core",
|
|
"//packages/angular_devkit/schematics",
|
|
"//packages/angular_devkit/schematics/testing",
|
|
"@npm//@types/semver",
|
|
"@npm//rxjs",
|
|
],
|
|
)
|
|
|
|
jasmine_node_test(
|
|
name = "angular-cli_test",
|
|
srcs = [":angular-cli_test_lib"],
|
|
)
|
|
|
|
# @external_begin
|
|
genrule(
|
|
name = "license",
|
|
srcs = ["//:LICENSE"],
|
|
outs = ["LICENSE"],
|
|
cmd = "cp $(execpath //:LICENSE) $@",
|
|
)
|
|
|
|
pkg_npm(
|
|
name = "npm_package",
|
|
pkg_deps = [
|
|
"//packages/angular_devkit/architect:package.json",
|
|
"//packages/angular_devkit/build_angular:package.json",
|
|
"//packages/angular_devkit/build_webpack:package.json",
|
|
"//packages/angular_devkit/core:package.json",
|
|
"//packages/angular_devkit/schematics:package.json",
|
|
"//packages/schematics/angular:package.json",
|
|
],
|
|
deps = [
|
|
":README.md",
|
|
":angular-cli",
|
|
":license",
|
|
":src/commands/update/schematic/collection.json",
|
|
":src/commands/update/schematic/schema.json",
|
|
],
|
|
)
|
|
# @external_end
|