chore(docs): rename @private to @internal
This change corresponds to https://github.com/angular/angular/pull/4477
This commit is contained in:
parent
bb19588676
commit
97ae3d0ca9
|
@ -16,6 +16,10 @@ module.exports = new Package('angular.io', [basePackage])
|
||||||
.unshift(path.resolve(__dirname, 'templates'));
|
.unshift(path.resolve(__dirname, 'templates'));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
.config(function(parseTagsProcessor) {
|
||||||
|
parseTagsProcessor.tagDefinitions.push({ name: 'internal', transforms: function() { return true; } });
|
||||||
|
})
|
||||||
|
|
||||||
.config(function(readTypeScriptModules, writeFilesProcessor, readFilesProcessor) {
|
.config(function(readTypeScriptModules, writeFilesProcessor, readFilesProcessor) {
|
||||||
|
|
||||||
readTypeScriptModules.sourceFiles = [
|
readTypeScriptModules.sourceFiles = [
|
||||||
|
|
|
@ -35,7 +35,7 @@ module.exports = function addJadeDataDocsProcessor() {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
_.forEach(docs, function(doc) {
|
_.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);
|
modules.push(doc);
|
||||||
|
|
||||||
// GET DATA FOR INDEX PAGE OF MODULE SECTION
|
// GET DATA FOR INDEX PAGE OF MODULE SECTION
|
||||||
|
|
|
@ -43,7 +43,7 @@ p.location-badge.
|
||||||
|
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{%- for member in doc.members %}{% if not member.private %}
|
{%- for member in doc.members %}{% if not member.internal %}
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
h3#{$ member.name | toId $} {$ member.name $}{% if member.optional %}?{% endif %}
|
h3#{$ member.name | toId $} {$ member.name $}{% if member.optional %}?{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,9 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage,
|
||||||
log.level = 'info';
|
log.level = 'info';
|
||||||
})
|
})
|
||||||
|
|
||||||
|
.config(function(parseTagsProcessor) {
|
||||||
|
parseTagsProcessor.tagDefinitions.push({ name: 'internal', transforms: function() { return true; } });
|
||||||
|
})
|
||||||
|
|
||||||
.config(function(renderDocsProcessor, versionInfo) {
|
.config(function(renderDocsProcessor, versionInfo) {
|
||||||
renderDocsProcessor.extraData.versionInfo = versionInfo;
|
renderDocsProcessor.extraData.versionInfo = versionInfo;
|
||||||
|
|
|
@ -27,7 +27,7 @@ module.exports = function generateNavigationDoc() {
|
||||||
modulesDoc.value.sections.push(moduleNavItem);
|
modulesDoc.value.sections.push(moduleNavItem);
|
||||||
|
|
||||||
_.forEach(doc.exports, function(exportDoc) {
|
_.forEach(doc.exports, function(exportDoc) {
|
||||||
if (!exportDoc.private) {
|
if (!exportDoc.internal) {
|
||||||
var exportNavItem = {
|
var exportNavItem = {
|
||||||
path: exportDoc.path,
|
path: exportDoc.path,
|
||||||
partial: exportDoc.outputPath,
|
partial: exportDoc.outputPath,
|
||||||
|
|
|
@ -28,7 +28,7 @@ defined in {$ githubViewLink(doc) $}
|
||||||
</section>
|
</section>
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{%- for member in doc.members %}{% if not member.private %}
|
{%- for member in doc.members %}{% if not member.internal %}
|
||||||
<section class="member">
|
<section class="member">
|
||||||
<h1 id="{$ member.name $}" class="name">
|
<h1 id="{$ member.name $}" class="name">
|
||||||
{$ member.name $}{% if member.optional %}?{% endif %}{$ paramList(member.params) $}
|
{$ member.name $}{% if member.optional %}?{% endif %}{$ paramList(member.params) $}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<h2>Exports</h2>
|
<h2>Exports</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{%- for exportDoc in doc.exports %}
|
{%- 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>
|
<li><a href="{$ exportDoc.path $}"><strong>{$ exportDoc.name $}</strong> {$ exportDoc.docType $}</a></li>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
|
@ -4,8 +4,8 @@ module.exports = function convertPrivateClassesToInterfaces() {
|
||||||
return function(exportDocs, addInjectableReference) {
|
return function(exportDocs, addInjectableReference) {
|
||||||
_.forEach(exportDocs, function(exportDoc) {
|
_.forEach(exportDocs, function(exportDoc) {
|
||||||
|
|
||||||
// Search for classes with a constructor marked as `@private`
|
// Search for classes with a constructor marked as `@internal`
|
||||||
if (exportDoc.docType === 'class' && exportDoc.constructorDoc && exportDoc.constructorDoc.private) {
|
if (exportDoc.docType === 'class' && exportDoc.constructorDoc && exportDoc.constructorDoc.internal) {
|
||||||
|
|
||||||
// Convert this class to an interface with no constructor
|
// Convert this class to an interface with no constructor
|
||||||
exportDoc.docType = 'interface';
|
exportDoc.docType = 'interface';
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe('readTypeScriptModules', function() {
|
||||||
docType: 'class',
|
docType: 'class',
|
||||||
name: 'privateClass',
|
name: 'privateClass',
|
||||||
id: 'privateClass',
|
id: 'privateClass',
|
||||||
constructorDoc: { private: true }
|
constructorDoc: { internal: true }
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
convertPrivateClassesToInterfaces(docs, false);
|
convertPrivateClassesToInterfaces(docs, false);
|
||||||
|
@ -45,7 +45,7 @@ describe('readTypeScriptModules', function() {
|
||||||
docType: 'class',
|
docType: 'class',
|
||||||
name: 'privateClass',
|
name: 'privateClass',
|
||||||
id: 'privateClass',
|
id: 'privateClass',
|
||||||
constructorDoc: { private: true },
|
constructorDoc: { internal: true },
|
||||||
heritage: 'implements parentInterface'
|
heritage: 'implements parentInterface'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -60,7 +60,7 @@ describe('readTypeScriptModules', function() {
|
||||||
docType: 'class',
|
docType: 'class',
|
||||||
name: 'privateClass',
|
name: 'privateClass',
|
||||||
id: 'privateClass',
|
id: 'privateClass',
|
||||||
constructorDoc: { private: true },
|
constructorDoc: { internal: true },
|
||||||
heritage: 'implements parentInterface'
|
heritage: 'implements parentInterface'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue