From 1da3066ec1fe25e400787ec772ba5fef9868bb62 Mon Sep 17 00:00:00 2001 From: Eric Jimenez Date: Thu, 31 Mar 2016 14:17:17 -0400 Subject: [PATCH] Add additional tags to the angular.io dgeni package for the new api doc style proposal. --- tools/api-builder/angular.io-package/index.js | 7 +++---- .../api-builder/angular.io-package/tag-defs/deprecated.js | 5 +++++ tools/api-builder/angular.io-package/tag-defs/howToUse.js | 5 +++++ tools/api-builder/angular.io-package/tag-defs/index.js | 6 ++++++ tools/api-builder/angular.io-package/tag-defs/internal.js | 8 ++++++++ tools/api-builder/angular.io-package/tag-defs/whatItIs.js | 5 +++++ .../angular.io-package/templates/class.template.html | 3 +++ 7 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 tools/api-builder/angular.io-package/tag-defs/deprecated.js create mode 100644 tools/api-builder/angular.io-package/tag-defs/howToUse.js create mode 100644 tools/api-builder/angular.io-package/tag-defs/index.js create mode 100644 tools/api-builder/angular.io-package/tag-defs/internal.js create mode 100644 tools/api-builder/angular.io-package/tag-defs/whatItIs.js diff --git a/tools/api-builder/angular.io-package/index.js b/tools/api-builder/angular.io-package/index.js index c060562743..827d31a22c 100644 --- a/tools/api-builder/angular.io-package/index.js +++ b/tools/api-builder/angular.io-package/index.js @@ -34,8 +34,8 @@ module.exports = new Package('angular.io', [basePackage, targetPackage, cheatshe }; }) -.config(function(parseTagsProcessor) { - parseTagsProcessor.tagDefinitions.push({ name: 'internal', transforms: function() { return true; } }); +.config(function(parseTagsProcessor, getInjectables) { + parseTagsProcessor.tagDefinitions = parseTagsProcessor.tagDefinitions.concat(getInjectables(require('./tag-defs'))); }) .config(function(readTypeScriptModules, writeFilesProcessor, readFilesProcessor) { @@ -139,5 +139,4 @@ module.exports = new Package('angular.io', [basePackage, targetPackage, cheatshe 'IMPLEMENTS', 'ABSTRACT' ]; -}) - +}); diff --git a/tools/api-builder/angular.io-package/tag-defs/deprecated.js b/tools/api-builder/angular.io-package/tag-defs/deprecated.js new file mode 100644 index 0000000000..ba45af3e97 --- /dev/null +++ b/tools/api-builder/angular.io-package/tag-defs/deprecated.js @@ -0,0 +1,5 @@ +module.exports = function() { + return { + name: 'deprecated' + }; +}; diff --git a/tools/api-builder/angular.io-package/tag-defs/howToUse.js b/tools/api-builder/angular.io-package/tag-defs/howToUse.js new file mode 100644 index 0000000000..21d4378a14 --- /dev/null +++ b/tools/api-builder/angular.io-package/tag-defs/howToUse.js @@ -0,0 +1,5 @@ +module.exports = function() { + return { + name: 'howToUse' + }; +}; diff --git a/tools/api-builder/angular.io-package/tag-defs/index.js b/tools/api-builder/angular.io-package/tag-defs/index.js new file mode 100644 index 0000000000..3b1891e8d3 --- /dev/null +++ b/tools/api-builder/angular.io-package/tag-defs/index.js @@ -0,0 +1,6 @@ +module.exports = [ + require('./deprecated'), + require('./howToUse'), + require('./whatItIs'), + require('./internal') +]; diff --git a/tools/api-builder/angular.io-package/tag-defs/internal.js b/tools/api-builder/angular.io-package/tag-defs/internal.js new file mode 100644 index 0000000000..aac449ccf7 --- /dev/null +++ b/tools/api-builder/angular.io-package/tag-defs/internal.js @@ -0,0 +1,8 @@ +module.exports = function() { + return { + name: 'internal', + transforms: function() { + return true; + } + } +}; diff --git a/tools/api-builder/angular.io-package/tag-defs/whatItIs.js b/tools/api-builder/angular.io-package/tag-defs/whatItIs.js new file mode 100644 index 0000000000..e0308b310d --- /dev/null +++ b/tools/api-builder/angular.io-package/tag-defs/whatItIs.js @@ -0,0 +1,5 @@ +module.exports = function() { + return { + name: 'whatItIs' + }; +}; diff --git a/tools/api-builder/angular.io-package/templates/class.template.html b/tools/api-builder/angular.io-package/templates/class.template.html index 1ae71026de..fe03e03449 100644 --- a/tools/api-builder/angular.io-package/templates/class.template.html +++ b/tools/api-builder/angular.io-package/templates/class.template.html @@ -1,3 +1,6 @@ + + + {% include "lib/githubLinks.html" -%} {% include "lib/paramList.html" -%} {% extends 'layout/base.template.html' -%}