2024-08-02 16:42:23 +00:00
|
|
|
load("//adev/shared-docs/pipeline/api-gen/extraction:extract_api_to_json.bzl", "extract_api_to_json")
|
|
|
|
|
load("//adev/shared-docs/pipeline/api-gen/rendering:render_api_to_html.bzl", "render_api_to_html")
|
|
|
|
|
|
2025-05-05 22:08:35 +00:00
|
|
|
def generate_api_docs(name, module_name, entry_point, srcs, repo = "angular/angular", private_modules = [""], module_label = None, import_map = {}, extra_entries = []):
|
2024-08-02 16:42:23 +00:00
|
|
|
"""Generates API documentation reference pages for the given sources."""
|
|
|
|
|
json_outfile = name + "_api.json"
|
|
|
|
|
|
|
|
|
|
extract_api_to_json(
|
|
|
|
|
name = name + "_extraction",
|
2025-05-05 22:08:35 +00:00
|
|
|
repo = repo,
|
2024-08-02 16:42:23 +00:00
|
|
|
module_name = module_name,
|
2024-08-13 08:54:36 +00:00
|
|
|
module_label = module_label,
|
2024-08-02 16:42:23 +00:00
|
|
|
entry_point = entry_point,
|
|
|
|
|
srcs = srcs,
|
|
|
|
|
output_name = json_outfile,
|
|
|
|
|
import_map = import_map,
|
|
|
|
|
extra_entries = extra_entries,
|
2024-08-30 15:23:04 +00:00
|
|
|
private_modules = private_modules,
|
2024-08-02 16:42:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
render_api_to_html(
|
|
|
|
|
name = name,
|
|
|
|
|
srcs = [json_outfile],
|
|
|
|
|
)
|