angular-cli/tools/ng_cli_schema_generator.bzl
Paul Gschwendtner 01ea33e372 build: migrate CLI schema generation to rules_js
Migrates the CLI schema generation to `rules_js`, also significantly
simplifying the rule boilerplate.
2025-01-30 11:16:46 +01:00

13 lines
413 B
Python

load("@aspect_rules_js//js:defs.bzl", "js_run_binary")
def cli_json_schema(name, src, out, data = []):
js_run_binary(
name = name,
outs = [out],
srcs = [src] + data,
tool = "//tools:ng_cli_schema",
progress_message = "Generating CLI interface from %s" % src,
mnemonic = "NgCliJsonSchema",
args = ["$(rootpath %s)" % src, "$(rootpath %s)" % out],
)