From ca0acb6107a4ae525bb4d183ea10878241746383 Mon Sep 17 00:00:00 2001 From: Eric Jimenez Date: Wed, 27 Jul 2016 12:50:23 -0400 Subject: [PATCH 1/3] hide notes if none are found --- .../angular.io-package/templates/layout/_how-to-use.html | 6 ++---- .../angular.io-package/templates/layout/_what-it-does.html | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tools/api-builder/angular.io-package/templates/layout/_how-to-use.html b/tools/api-builder/angular.io-package/templates/layout/_how-to-use.html index 1c8e738dd9..63ed50bb80 100644 --- a/tools/api-builder/angular.io-package/templates/layout/_how-to-use.html +++ b/tools/api-builder/angular.io-package/templates/layout/_how-to-use.html @@ -1,10 +1,8 @@ +{%- if doc.howToUse %} div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") How to use div(flex="80" flex-xs="100") :marked - {%- if doc.howToUse %} {$ doc.howToUse | indentForMarkdown(6) $} - {% else %} - *Not yet documented* - {% endif %} \ No newline at end of file +{% endif %} \ No newline at end of file diff --git a/tools/api-builder/angular.io-package/templates/layout/_what-it-does.html b/tools/api-builder/angular.io-package/templates/layout/_what-it-does.html index a4e7c58ab6..68de41293e 100644 --- a/tools/api-builder/angular.io-package/templates/layout/_what-it-does.html +++ b/tools/api-builder/angular.io-package/templates/layout/_what-it-does.html @@ -1,10 +1,8 @@ +{%- if doc.whatItDoes %} div(layout="row" layout-xs="column" class="row-margin ng-cloak") div(flex="20" flex-xs="100") h2(class="h2-api-docs") What it does div(flex="80" flex-xs="100") :marked - {%- if doc.whatItDoes %} {$ doc.whatItDoes | indentForMarkdown(6) $} - {% else %} - *Not yet documented* - {% endif %} \ No newline at end of file +{% endif %} \ No newline at end of file From 1e194b196008932417d4067d46300781b17eed8b Mon Sep 17 00:00:00 2001 From: Eric Jimenez Date: Wed, 27 Jul 2016 12:58:29 -0400 Subject: [PATCH 2/3] change arrow style function to regular function --- public/resources/js/directives/api-list.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/resources/js/directives/api-list.js b/public/resources/js/directives/api-list.js index 97c4afa980..a7cac49374 100644 --- a/public/resources/js/directives/api-list.js +++ b/public/resources/js/directives/api-list.js @@ -39,8 +39,9 @@ angularIO.directive('apiList', function () { { cssClass: 'const', title: 'Const', matches: ['var', 'let', 'const'] } ]; - if (isForDart) $ctrl.apiTypes = $ctrl.apiTypes.filter((t) => - !t.cssClass.match(/^(stable|directive|decorator|interface|enum)$/)); + if (isForDart) $ctrl.apiTypes = $ctrl.apiTypes.filter(function (t) { + return !t.cssClass.match(/^(stable|directive|decorator|interface|enum)$/); + }); $ctrl.apiFilter = getApiFilterFromLocation(); $ctrl.apiType = getApiTypeFromLocation(); From cece720f47ede224a25ca0fe4063507edee6775c Mon Sep 17 00:00:00 2001 From: Eric Jimenez Date: Thu, 28 Jul 2016 10:29:03 -0400 Subject: [PATCH 3/3] output an audit file to keep track of documentation progress on API --- tools/api-builder/angular.io-package/index.js | 6 ++++++ .../templates/api-list-audit.template.html | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tools/api-builder/angular.io-package/templates/api-list-audit.template.html diff --git a/tools/api-builder/angular.io-package/index.js b/tools/api-builder/angular.io-package/index.js index 9f59e99221..4f4121ad7c 100644 --- a/tools/api-builder/angular.io-package/index.js +++ b/tools/api-builder/angular.io-package/index.js @@ -135,6 +135,12 @@ module.exports = new Package('angular.io', [basePackage, targetPackage, cheatshe pathTemplate: 'api-list.json', outputPathTemplate: '${path}' }); + + computePathsProcessor.pathTemplates.push({ + docTypes: ['api-list-data'], + pathTemplate: 'api-list-audit.json', + outputPathTemplate: '${path}' + }); computePathsProcessor.pathTemplates.push({ docTypes: ['cheatsheet-data'], diff --git a/tools/api-builder/angular.io-package/templates/api-list-audit.template.html b/tools/api-builder/angular.io-package/templates/api-list-audit.template.html new file mode 100644 index 0000000000..92fe2fcbec --- /dev/null +++ b/tools/api-builder/angular.io-package/templates/api-list-audit.template.html @@ -0,0 +1,15 @@ +[{% for module, items in doc.data %} + {% for item in items %} + { + "title": "{$ item.title $}", + "path": "{$ item.exportDoc.path $}", + "docType": "{$ item.docType $}", + "stability": "{$ item.stability $}", + "secure": "{$ item.security $}", + "howToUse": "{$ item.howToUse $}", + "whatItDoes": {% if item.whatItDoes %}"Exists"{% else %}"Not Done"{% endif %}, + "barrel" : "{$ module | replace("/index", "") $}" + }{% if not loop.last %},{% endif %} + {% endfor %} + {% endfor %} +] \ No newline at end of file