mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-19 20:52:06 +08:00
fixup! build: migrate @angular-devkit/architect
to npm_package
Include JSON files
This commit is contained in:
parent
2218b0d0df
commit
b55bd318f1
@ -12,7 +12,6 @@ licenses(["notice"])
|
|||||||
|
|
||||||
package(default_visibility = ["//visibility:public"])
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
# @external_begin
|
|
||||||
ts_json_schema(
|
ts_json_schema(
|
||||||
name = "builder_input_schema",
|
name = "builder_input_schema",
|
||||||
src = "src/input-schema.json",
|
src = "src/input-schema.json",
|
||||||
@ -37,7 +36,14 @@ ts_json_schema(
|
|||||||
name = "operator_schema",
|
name = "operator_schema",
|
||||||
src = "builders/operator-schema.json",
|
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(
|
ts_project(
|
||||||
name = "architect",
|
name = "architect",
|
||||||
@ -56,13 +62,8 @@ ts_project(
|
|||||||
"//packages/angular_devkit/architect:src/progress-schema.ts",
|
"//packages/angular_devkit/architect:src/progress-schema.ts",
|
||||||
"//packages/angular_devkit/architect:builders/operator-schema.ts",
|
"//packages/angular_devkit/architect:builders/operator-schema.ts",
|
||||||
],
|
],
|
||||||
data = glob(
|
# Ensure tests can execute the output JS, relying on schemas/JSON files.
|
||||||
include = ["**/*.json"],
|
data = JSON_FILES,
|
||||||
exclude = [
|
|
||||||
# NB: we need to exclude the nested node_modules that is laid out by yarn workspaces
|
|
||||||
"node_modules/**",
|
|
||||||
],
|
|
||||||
),
|
|
||||||
module_name = "@angular-devkit/architect",
|
module_name = "@angular-devkit/architect",
|
||||||
deps = [
|
deps = [
|
||||||
"//:root_modules/@types/node",
|
"//:root_modules/@types/node",
|
||||||
@ -104,7 +105,7 @@ npm_package(
|
|||||||
"//packages/angular_devkit/core:package.json",
|
"//packages/angular_devkit/core:package.json",
|
||||||
],
|
],
|
||||||
tags = ["release-package"],
|
tags = ["release-package"],
|
||||||
deps = [
|
deps = JSON_FILES + [
|
||||||
"README.md",
|
"README.md",
|
||||||
":architect_rjs",
|
":architect_rjs",
|
||||||
":license",
|
":license",
|
||||||
|
@ -77,17 +77,14 @@ def npm_package(
|
|||||||
_npm_package(
|
_npm_package(
|
||||||
name = "npm_package",
|
name = "npm_package",
|
||||||
visibility = visibility,
|
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 = {
|
replace_prefixes = {
|
||||||
"substituted_final/": "",
|
"substituted_final/": "",
|
||||||
"substituted_with_tars/": "",
|
"substituted_with_tars/": "",
|
||||||
"substituted_with_snapshot_repos/": "",
|
"substituted_with_snapshot_repos/": "",
|
||||||
"substituted/": "",
|
"substituted/": "",
|
||||||
},
|
},
|
||||||
exclude_srcs_patterns = [
|
|
||||||
# Exclude `node_modules` which may be pulled by the `js_module_output` runfiles.
|
|
||||||
"node_modules/**/*",
|
|
||||||
],
|
|
||||||
allow_overwrites = True,
|
allow_overwrites = True,
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user