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'));
|
||||
})
|
||||
|
||||
.config(function(parseTagsProcessor) {
|
||||
parseTagsProcessor.tagDefinitions.push({ name: 'internal', transforms: function() { return true; } });
|
||||
})
|
||||
|
||||
.config(function(readTypeScriptModules, writeFilesProcessor, readFilesProcessor) {
|
||||
|
||||
readTypeScriptModules.sourceFiles = [
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 %}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) $}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue