Skip to content

Commit 9ff3b36

Browse files
committed
docs(cdk/testing): specify repo in api docs
1 parent 8d4e816 commit 9ff3b36

File tree

6 files changed

+13
-0
lines changed

6 files changed

+13
-0
lines changed

src/cdk/testing/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,5 @@ extract_api_to_json(
5858
module_name = "@angular/cdk/testing",
5959
output_name = "cdk_testing.json",
6060
private_modules = [""],
61+
repo = "angular/components",
6162
)

src/cdk/testing/protractor/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ extract_api_to_json(
3131
module_name = "@angular/cdk/testing/protractor",
3232
output_name = "cdk_testing_protractor.json",
3333
private_modules = [""],
34+
repo = "angular/components",
3435
)

src/cdk/testing/selenium-webdriver/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ extract_api_to_json(
3030
module_name = "@angular/cdk/testing/selenium-webdriver",
3131
output_name = "cdk_testing_selenium_webdriver.json",
3232
private_modules = [""],
33+
repo = "angular/components",
3334
)

src/cdk/testing/testbed/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,5 @@ extract_api_to_json(
4646
module_name = "@angular/cdk/testing/testbed",
4747
output_name = "cdk_testing_testbed.json",
4848
private_modules = [""],
49+
repo = "angular/components",
4950
)

tools/adev-api-extraction/extract_api_to_json.bzl

+7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ def _extract_api_to_json(ctx):
1010
args.set_param_file_format("multiline")
1111
args.use_param_file("%s", use_always = True)
1212

13+
# Pass the repo name for the extracted APIs. This will be something like "angular/angular".
14+
args.add(ctx.attr.repo)
15+
1316
# Pass the module_name for the extracted APIs. This will be something like "@angular/core".
1417
args.add(ctx.attr.module_name)
1518

@@ -97,6 +100,10 @@ extract_api_to_json = rule(
97100
"module_label": attr.string(
98101
doc = """Module label to be used for the extracted symbols. To be used as display name, for example in API docs""",
99102
),
103+
"repo": attr.string(
104+
doc = """The name of the github repository the api belongs to""",
105+
mandatory = True,
106+
),
100107
"extra_entries": attr.label_list(
101108
doc = """JSON files that contain extra entries to append to the final collection.""",
102109
allow_files = True,

tools/adev-api-extraction/index.mts

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function main() {
2626
const rawParamLines = readFileSync(paramFilePath, {encoding: 'utf8'}).split('\n');
2727

2828
const [
29+
repo,
2930
moduleName,
3031
moduleLabel,
3132
serializedPrivateModules,
@@ -92,6 +93,7 @@ function main() {
9293
const normalized = moduleName.replace('@', '').replace(/[\/]/g, '_');
9394

9495
const output = JSON.stringify({
96+
repo,
9597
moduleLabel: moduleLabel || moduleName,
9698
moduleName: moduleName,
9799
normalizedModuleName: normalized,

0 commit comments

Comments
 (0)