Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 97ae3d0

Browse files
alexeaglenaomiblack
authored andcommitted
chore(docs): rename @Private to @internal
This change corresponds to angular/angular#4477
1 parent bb19588 commit 97ae3d0

File tree

9 files changed

+17
-10
lines changed

9 files changed

+17
-10
lines changed

public/api-builder/angular.io-package/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ module.exports = new Package('angular.io', [basePackage])
1616
.unshift(path.resolve(__dirname, 'templates'));
1717
})
1818

19+
.config(function(parseTagsProcessor) {
20+
parseTagsProcessor.tagDefinitions.push({ name: 'internal', transforms: function() { return true; } });
21+
})
22+
1923
.config(function(readTypeScriptModules, writeFilesProcessor, readFilesProcessor) {
2024

2125
readTypeScriptModules.sourceFiles = [

public/api-builder/angular.io-package/processors/addJadeDataDocsProcessor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ module.exports = function addJadeDataDocsProcessor() {
3535
*/
3636

3737
_.forEach(docs, function(doc) {
38-
if (doc.docType === 'module' && !doc.private && doc.exports.length) {
38+
if (doc.docType === 'module' && !doc.internal && doc.exports.length) {
3939
modules.push(doc);
4040

4141
// GET DATA FOR INDEX PAGE OF MODULE SECTION

public/api-builder/angular.io-package/templates/class.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
{% endif -%}
4545

46-
{%- for member in doc.members %}{% if not member.private %}
46+
{%- for member in doc.members %}{% if not member.internal %}
4747
.l-sub-section
4848
h3#{$ member.name | toId $} {$ member.name $}{% if member.optional %}?{% endif %}
4949

public/api-builder/docs-package/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ module.exports = new Package('angular-v2-docs', [jsdocPackage, nunjucksPackage,
2525
log.level = 'info';
2626
})
2727

28+
.config(function(parseTagsProcessor) {
29+
parseTagsProcessor.tagDefinitions.push({ name: 'internal', transforms: function() { return true; } });
30+
})
2831

2932
.config(function(renderDocsProcessor, versionInfo) {
3033
renderDocsProcessor.extraData.versionInfo = versionInfo;

public/api-builder/docs-package/processors/generateNavigationDoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = function generateNavigationDoc() {
2727
modulesDoc.value.sections.push(moduleNavItem);
2828

2929
_.forEach(doc.exports, function(exportDoc) {
30-
if (!exportDoc.private) {
30+
if (!exportDoc.internal) {
3131
var exportNavItem = {
3232
path: exportDoc.path,
3333
partial: exportDoc.outputPath,

public/api-builder/docs-package/templates/class.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ <h1 id="constructor" class="name">{$ doc.constructorDoc.name $}{$ paramList(doc.
2828
</section>
2929
{% endif -%}
3030

31-
{%- for member in doc.members %}{% if not member.private %}
31+
{%- for member in doc.members %}{% if not member.internal %}
3232
<section class="member">
3333
<h1 id="{$ member.name $}" class="name">
3434
{$ member.name $}{% if member.optional %}?{% endif %}{$ paramList(member.params) $}

public/api-builder/docs-package/templates/module.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1 class="id">{$ doc.id $} <span class="type">module</span></h1>
1010
<h2>Exports</h2>
1111
<ul>
1212
{%- for exportDoc in doc.exports %}
13-
{% if not exportDoc.private -%}
13+
{% if not exportDoc.internal -%}
1414
<li><a href="{$ exportDoc.path $}"><strong>{$ exportDoc.name $}</strong> {$ exportDoc.docType $}</a></li>
1515
{%- endif %}
1616
{%- endfor %}

public/api-builder/typescript-package/services/convertPrivateClassesToInterfaces.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ module.exports = function convertPrivateClassesToInterfaces() {
44
return function(exportDocs, addInjectableReference) {
55
_.forEach(exportDocs, function(exportDoc) {
66

7-
// Search for classes with a constructor marked as `@private`
8-
if (exportDoc.docType === 'class' && exportDoc.constructorDoc && exportDoc.constructorDoc.private) {
7+
// Search for classes with a constructor marked as `@internal`
8+
if (exportDoc.docType === 'class' && exportDoc.constructorDoc && exportDoc.constructorDoc.internal) {
99

1010
// Convert this class to an interface with no constructor
1111
exportDoc.docType = 'interface';

public/api-builder/typescript-package/services/convertPrivateClassesToInterfaces.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe('readTypeScriptModules', function() {
1717
docType: 'class',
1818
name: 'privateClass',
1919
id: 'privateClass',
20-
constructorDoc: { private: true }
20+
constructorDoc: { internal: true }
2121
}
2222
];
2323
convertPrivateClassesToInterfaces(docs, false);
@@ -45,7 +45,7 @@ describe('readTypeScriptModules', function() {
4545
docType: 'class',
4646
name: 'privateClass',
4747
id: 'privateClass',
48-
constructorDoc: { private: true },
48+
constructorDoc: { internal: true },
4949
heritage: 'implements parentInterface'
5050
}
5151
];
@@ -60,7 +60,7 @@ describe('readTypeScriptModules', function() {
6060
docType: 'class',
6161
name: 'privateClass',
6262
id: 'privateClass',
63-
constructorDoc: { private: true },
63+
constructorDoc: { internal: true },
6464
heritage: 'implements parentInterface'
6565
}
6666
];

0 commit comments

Comments
 (0)