This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed
tools/api-builder/angular.io-package Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -76,12 +76,34 @@ module.exports = function addJadeDataDocsProcessor() {
76
76
stability = 'deprecated' ;
77
77
}
78
78
79
+ var howToUse = '' ;
80
+ if ( _ . has ( exportDoc , 'howToUse' ) ) {
81
+ var howToUseArray = exportDoc . tags . tags . filter ( function ( tag ) {
82
+ return tag . tagName === 'howToUse'
83
+ } ) ;
84
+
85
+ // Remove line breaks, there should only be one tag
86
+ howToUse = howToUseArray [ 0 ] . description . replace ( / ( \r \n | \n | \r ) / gm, "" ) ;
87
+ }
88
+
89
+ var whatItDoes = '' ;
90
+ if ( _ . has ( exportDoc , 'whatItDoes' ) ) {
91
+ var whatItDoesArray = exportDoc . tags . tags . filter ( function ( tag ) {
92
+ return tag . tagName === 'whatItDoes'
93
+ } ) ;
94
+
95
+ // Remove line breaks, there should only be one tag
96
+ whatItDoes = whatItDoesArray [ 0 ] . description . replace ( / ( \r \n | \n | \r ) / gm, "" ) ;
97
+ }
98
+
79
99
var dataDoc = {
80
100
name : exportDoc . name + '-' + exportDoc . docType ,
81
101
title : exportDoc . name ,
82
102
docType : exportDoc . docType ,
83
103
exportDoc : exportDoc ,
84
- stability : stability
104
+ stability : stability ,
105
+ howToUse : howToUse ,
106
+ whatItDoes : whatItDoes
85
107
} ;
86
108
87
109
if ( exportDoc . symbolTypeName ) dataDoc . varType = titleCase ( exportDoc . symbolTypeName ) ;
Original file line number Diff line number Diff line change 4
4
{
5
5
"title": "{$ item.title $}",
6
6
"path": "{$ item.exportDoc.path $}",
7
- "docType": "{$ item.docType $}"
7
+ "docType": "{$ item.docType $}",
8
+ "stability": "{$ item.stability $}",
9
+ "secure": "{$ item.security $}",
10
+ "howToUse": "{$ item.howToUse $}",
11
+ "whatItDoes": {% if item.whatItDoes %}"Exists"{% else %}"Not Done"{% endif %},
12
+ "barrel" : "{$ module $}"
8
13
}{% if not loop.last %},{% endif %}
9
14
{% endfor %}]{% if not loop.last %},{% endif %}
10
15
{% endfor -%}
You can’t perform that action at this time.
0 commit comments