mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 19:13:34 +08:00
97 lines
2.5 KiB
Python
97 lines
2.5 KiB
Python
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
|
|
load("//tools:defaults2.bzl", "jasmine_test", "npm_package", "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"])
|
|
|
|
RUNTIME_ASSETS = glob(
|
|
include = ["**/*.json"],
|
|
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
|
|
exclude = [
|
|
"node_modules/**",
|
|
"src/workspace/json/test/**",
|
|
],
|
|
)
|
|
|
|
ts_project(
|
|
name = "core",
|
|
srcs = glob(
|
|
include = ["src/**/*.ts"],
|
|
exclude = [
|
|
"src/**/*_spec.ts",
|
|
],
|
|
) + ["index.ts"],
|
|
data = RUNTIME_ASSETS,
|
|
module_name = "@angular-devkit/core",
|
|
deps = [
|
|
"//:node_modules/@types/node",
|
|
"//:node_modules/@types/picomatch",
|
|
"//:node_modules/@types/jasmine",
|
|
"//:node_modules/ajv",
|
|
"//:node_modules/ajv-formats",
|
|
"//:node_modules/jsonc-parser",
|
|
"//:node_modules/picomatch",
|
|
"//:node_modules/rxjs",
|
|
"//:node_modules/source-map",
|
|
# @node_module: typescript:es2015.proxy
|
|
# @node_module: typescript:es2015.reflect
|
|
# @node_module: typescript:es2015.symbol.wellknown
|
|
# @typings: source_map
|
|
],
|
|
)
|
|
|
|
# @external_begin
|
|
|
|
ts_project(
|
|
name = "core_test_lib",
|
|
testonly = True,
|
|
srcs = glob(["src/**/*_spec.ts"]),
|
|
data = glob(["src/workspace/json/test/**/*.json"]),
|
|
deps = [
|
|
":core_rjs",
|
|
"//:node_modules/rxjs",
|
|
"//packages/angular_devkit/core/node:node_rjs",
|
|
],
|
|
)
|
|
|
|
jasmine_test(
|
|
name = "core_test",
|
|
data = [":core_test_lib_rjs"],
|
|
)
|
|
|
|
genrule(
|
|
name = "license",
|
|
srcs = ["//:LICENSE"],
|
|
outs = ["LICENSE"],
|
|
cmd = "cp $(execpath //:LICENSE) $@",
|
|
)
|
|
|
|
npm_package(
|
|
name = "pkg",
|
|
tags = ["release-package"],
|
|
deps = RUNTIME_ASSETS + [
|
|
":README.md",
|
|
":core_rjs",
|
|
":license",
|
|
"//packages/angular_devkit/core/node:node_rjs",
|
|
"//packages/angular_devkit/core/node/testing:testing_rjs",
|
|
],
|
|
)
|
|
|
|
api_golden_test_npm_package(
|
|
name = "core_api",
|
|
data = [
|
|
":npm_package",
|
|
"//goldens:public-api",
|
|
],
|
|
golden_dir = "angular_cli/goldens/public-api/angular_devkit/core",
|
|
npm_package = "angular_cli/packages/angular_devkit/core/npm_package",
|
|
types = ["@npm//@types/node"],
|
|
)
|
|
# @external_end
|