angular-cli/tools/BUILD.bazel
Paul Gschwendtner b40fa4073d build: migrate ts_json_schema rule to rules_js
Migrates to `rules_js` and simplifies! the `ts_json_schema` rule
2025-01-30 11:16:46 +01:00

57 lines
1.3 KiB
Python

load("@aspect_bazel_lib//lib/private:tar_toolchain.bzl", "tar_toolchain")
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("//tools:defaults2.bzl", "js_binary")
package(default_visibility = ["//visibility:public"])
exports_files([
"package_json_release_filter.jq",
])
js_binary(
name = "ng_cli_schema",
data = [
"ng_cli_schema_generator.js",
],
entry_point = "ng_cli_schema_generator.js",
)
js_binary(
name = "quicktype_runner",
data = [
"quicktype_runner.js",
"//:node_modules/quicktype-core",
],
entry_point = "quicktype_runner.js",
)
tar_toolchain(
name = "system_tar_exec",
binary = "tar_system.bat",
)
toolchain(
name = "windows_tar_system_toolchain",
exec_compatible_with = ["@platforms//os:windows"],
toolchain = ":system_tar_exec",
toolchain_type = "@aspect_bazel_lib//lib:tar_toolchain_type",
)
# TODO(devversion): Improve this by potentially sharing this common block.
copy_file(
name = "copy_worker_js",
src = "@tsc_worker//file",
out = "ts_worker.mjs",
)
js_binary(
name = "vanilla_ts_worker",
data = [
":copy_worker_js",
"//:node_modules/@angular/compiler-cli",
"//:node_modules/typescript",
],
entry_point = ":copy_worker_js",
fixed_args = ["--vanilla-ts"],
)