1
0
mirror of https://github.com/angular/angular-cli.git synced 2025-05-18 11:44:05 +08:00

fixup! build: migrate @angular-devkit/architect to npm_package

Include JSON files
This commit is contained in:
Paul Gschwendtner 2025-01-09 19:10:46 +00:00 committed by Alan Agius
parent 2218b0d0df
commit b55bd318f1
2 changed files with 13 additions and 15 deletions
packages/angular_devkit/architect
tools/bazel

@ -12,7 +12,6 @@ licenses(["notice"])
package(default_visibility = ["//visibility:public"])
# @external_begin
ts_json_schema(
name = "builder_input_schema",
src = "src/input-schema.json",
@ -37,7 +36,14 @@ ts_json_schema(
name = "operator_schema",
src = "builders/operator-schema.json",
)
# @external_end
JSON_FILES = glob(
include = ["**/*.json"],
exclude = [
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
"node_modules/**",
],
)
ts_project(
name = "architect",
@ -56,13 +62,8 @@ ts_project(
"//packages/angular_devkit/architect:src/progress-schema.ts",
"//packages/angular_devkit/architect:builders/operator-schema.ts",
],
data = glob(
include = ["**/*.json"],
exclude = [
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
"node_modules/**",
],
),
# Ensure tests can execute the output JS, relying on schemas/JSON files.
data = JSON_FILES,
module_name = "@angular-devkit/architect",
deps = [
"//:root_modules/@types/node",
@ -104,7 +105,7 @@ npm_package(
"//packages/angular_devkit/core:package.json",
],
tags = ["release-package"],
deps = [
deps = JSON_FILES + [
"README.md",
":architect_rjs",
":license",

@ -77,17 +77,14 @@ def npm_package(
_npm_package(
name = "npm_package",
visibility = visibility,
srcs = [":final_package_json"] + deps,
# Note: Order matters here! Last file takes precedence after replaced prefixes.
srcs = deps + [":final_package_json"],
replace_prefixes = {
"substituted_final/": "",
"substituted_with_tars/": "",
"substituted_with_snapshot_repos/": "",
"substituted/": "",
},
exclude_srcs_patterns = [
# Exclude `node_modules` which may be pulled by the `js_module_output` runfiles.
"node_modules/**/*",
],
allow_overwrites = True,
**kwargs
)