chore(docs): rename @private to @internal

This change corresponds to https://github.com/angular/angular/pull/4477
This commit is contained in:
Alex Eagle 2015-10-02 14:44:57 -07:00 committed by Naomi Black
parent bb19588676
commit 97ae3d0ca9
9 changed files with 17 additions and 10 deletions

View File

@ -16,6 +16,10 @@ module.exports = new Package('angular.io', [basePackage])
.unshift(path.resolve(__dirname, 'templates'));
})
.config(function(parseTagsProcessor) {
parseTagsProcessor.tagDefinitions.push({ name: 'internal', transforms: function() { return true; } });
})
.config(function(readTypeScriptModules, writeFilesProcessor, readFilesProcessor) {
readTypeScriptModules.sourceFiles = [

View File

@ -35,7 +35,7 @@ module.exports = function addJadeDataDocsProcessor() {
*/
_.forEach(docs, function(doc) {
if (doc.docType === 'module' && !doc.private && doc.exports.length) {
if (doc.docType === 'module' && !doc.internal && doc.exports.length) {
modules.push(doc);
// GET DATA FOR INDEX PAGE OF MODULE SECTION

View File

@ -43,7 +43,7 @@ p.location-badge.
{% endif -%}
{%- for member in doc.members %}{% if not member.private %}
{%- for member in doc.members %}{% if not member.internal %}
.l-sub-section
h3#{$ member.name | toId $} {$ member.name $}{% if member.optional %}?{% endif %}

View File

@ -25,6 +25,9 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage,
log.level = 'info';
})
.config(function(parseTagsProcessor) {
parseTagsProcessor.tagDefinitions.push({ name: 'internal', transforms: function() { return true; } });
})
.config(function(renderDocsProcessor, versionInfo) {
renderDocsProcessor.extraData.versionInfo = versionInfo;

View File

@ -27,7 +27,7 @@ module.exports = function generateNavigationDoc() {
modulesDoc.value.sections.push(moduleNavItem);
_.forEach(doc.exports, function(exportDoc) {
if (!exportDoc.private) {
if (!exportDoc.internal) {
var exportNavItem = {
path: exportDoc.path,
partial: exportDoc.outputPath,

View File

@ -28,7 +28,7 @@ defined in {$ githubViewLink(doc) $}
</section>
{% endif -%}
{%- for member in doc.members %}{% if not member.private %}
{%- for member in doc.members %}{% if not member.internal %}
<section class="member">
<h1 id="{$ member.name $}" class="name">
{$ member.name $}{% if member.optional %}?{% endif %}{$ paramList(member.params) $}

View File

@ -10,7 +10,7 @@
<h2>Exports</h2>
<ul>
{%- for exportDoc in doc.exports %}
{% if not exportDoc.private -%}
{% if not exportDoc.internal -%}
<li><a href="{$ exportDoc.path $}"><strong>{$ exportDoc.name $}</strong> {$ exportDoc.docType $}</a></li>
{%- endif %}
{%- endfor %}

View File

@ -4,8 +4,8 @@ module.exports = function convertPrivateClassesToInterfaces() {
return function(exportDocs, addInjectableReference) {
_.forEach(exportDocs, function(exportDoc) {
// Search for classes with a constructor marked as `@private`
if (exportDoc.docType === 'class' && exportDoc.constructorDoc && exportDoc.constructorDoc.private) {
// Search for classes with a constructor marked as `@internal`
if (exportDoc.docType === 'class' && exportDoc.constructorDoc && exportDoc.constructorDoc.internal) {
// Convert this class to an interface with no constructor
exportDoc.docType = 'interface';

View File

@ -17,7 +17,7 @@ describe('readTypeScriptModules', function() {
docType: 'class',
name: 'privateClass',
id: 'privateClass',
constructorDoc: { private: true }
constructorDoc: { internal: true }
}
];
convertPrivateClassesToInterfaces(docs, false);
@ -45,7 +45,7 @@ describe('readTypeScriptModules', function() {
docType: 'class',
name: 'privateClass',
id: 'privateClass',
constructorDoc: { private: true },
constructorDoc: { internal: true },
heritage: 'implements parentInterface'
}
];
@ -60,7 +60,7 @@ describe('readTypeScriptModules', function() {
docType: 'class',
name: 'privateClass',
id: 'privateClass',
constructorDoc: { private: true },
constructorDoc: { internal: true },
heritage: 'implements parentInterface'
}
];