Keen Yee Liau fa9136a971 build: minor fixes for google3 sync
This commit makes a few minor changes to enable syncing the CLI repository
into google3.

1. mark pkg_tar and pkg_npm as external
2. remove dependencies (marked as comment) which are stale in google3
3. remove TS files generated from JSON schema in BUILD files since these
   files are compiled and added to the g3 codebase at sync time
4. Some minor typing changes
5. Remove duplicate licenses
6. mark dependencies which are not available in g3 as external
7. Immediately type the result of JSON.parse() as required by g3 linter.
   Otherwise, the type defaults to `any`.
2020-07-24 22:52:22 +02:00

69 lines
1.8 KiB
Python

load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "ts_library")
# 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
licenses(["notice"])
package(default_visibility = ["//visibility:public"])
# @angular-devkit/schematics-cli
ts_library(
name = "schematics_cli",
srcs = glob(
include = ["bin/**/*.ts"],
exclude = [
"bin/**/*_spec.ts",
"bin/**/*_benchmark.ts",
],
),
# The attribute below is needed in g3 to turn off strict typechecking
# strict_checks = False,
data = glob(
include = ["**/*.json"],
exclude = [
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
"node_modules/**",
],
),
module_name = "@angular-devkit/schematics-cli",
module_root = "bin/schematics.d.ts",
deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core/node",
"//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics/tasks",
"//packages/angular_devkit/schematics/tools",
"//packages/schematics/schematics",
"@npm//@types/inquirer",
"@npm//@types/minimist",
"@npm//@types/node",
"@npm//inquirer", # @external
"@npm//minimist", # @external
"@npm//rxjs",
"@npm//symbol-observable", # @external
],
)
ts_library(
name = "schematics_cli_test_lib",
testonly = True,
srcs = glob(
include = [
"bin/**/*_spec.ts",
],
),
# strict_checks = False,
deps = [
":schematics_cli",
],
)
jasmine_node_test(
name = "schematics_cli_test",
srcs = [":schematics_cli_test_lib"],
)