File tree 6 files changed +13
-0
lines changed
6 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -58,4 +58,5 @@ extract_api_to_json(
58
58
module_name = "@angular/cdk/testing" ,
59
59
output_name = "cdk_testing.json" ,
60
60
private_modules = ["" ],
61
+ repo = "angular/components" ,
61
62
)
Original file line number Diff line number Diff line change @@ -31,4 +31,5 @@ extract_api_to_json(
31
31
module_name = "@angular/cdk/testing/protractor" ,
32
32
output_name = "cdk_testing_protractor.json" ,
33
33
private_modules = ["" ],
34
+ repo = "angular/components" ,
34
35
)
Original file line number Diff line number Diff line change @@ -30,4 +30,5 @@ extract_api_to_json(
30
30
module_name = "@angular/cdk/testing/selenium-webdriver" ,
31
31
output_name = "cdk_testing_selenium_webdriver.json" ,
32
32
private_modules = ["" ],
33
+ repo = "angular/components" ,
33
34
)
Original file line number Diff line number Diff line change @@ -46,4 +46,5 @@ extract_api_to_json(
46
46
module_name = "@angular/cdk/testing/testbed" ,
47
47
output_name = "cdk_testing_testbed.json" ,
48
48
private_modules = ["" ],
49
+ repo = "angular/components" ,
49
50
)
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ def _extract_api_to_json(ctx):
10
10
args .set_param_file_format ("multiline" )
11
11
args .use_param_file ("%s" , use_always = True )
12
12
13
+ # Pass the repo name for the extracted APIs. This will be something like "angular/angular".
14
+ args .add (ctx .attr .repo )
15
+
13
16
# Pass the module_name for the extracted APIs. This will be something like "@angular/core".
14
17
args .add (ctx .attr .module_name )
15
18
@@ -97,6 +100,10 @@ extract_api_to_json = rule(
97
100
"module_label" : attr .string (
98
101
doc = """Module label to be used for the extracted symbols. To be used as display name, for example in API docs""" ,
99
102
),
103
+ "repo" : attr .string (
104
+ doc = """The name of the github repository the api belongs to""" ,
105
+ mandatory = True ,
106
+ ),
100
107
"extra_entries" : attr .label_list (
101
108
doc = """JSON files that contain extra entries to append to the final collection.""" ,
102
109
allow_files = True ,
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ function main() {
26
26
const rawParamLines = readFileSync ( paramFilePath , { encoding : 'utf8' } ) . split ( '\n' ) ;
27
27
28
28
const [
29
+ repo ,
29
30
moduleName ,
30
31
moduleLabel ,
31
32
serializedPrivateModules ,
@@ -92,6 +93,7 @@ function main() {
92
93
const normalized = moduleName . replace ( '@' , '' ) . replace ( / [ \/ ] / g, '_' ) ;
93
94
94
95
const output = JSON . stringify ( {
96
+ repo,
95
97
moduleLabel : moduleLabel || moduleName ,
96
98
moduleName : moduleName ,
97
99
normalizedModuleName : normalized ,
You can’t perform that action at this time.
0 commit comments