mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
fix(docs): don't render private class members
This commit is contained in:
@ -17,6 +17,7 @@ module.exports = function(currentVersion){
|
|||||||
.processor(require('./processors/latest-version'))
|
.processor(require('./processors/latest-version'))
|
||||||
.processor(require('./processors/index-page'))
|
.processor(require('./processors/index-page'))
|
||||||
.processor(require('./processors/jekyll'))
|
.processor(require('./processors/jekyll'))
|
||||||
|
.processor(require('./processors/remove-private-members'))
|
||||||
|
|
||||||
// for debugging docs
|
// for debugging docs
|
||||||
// .processor(function test(){
|
// .processor(function test(){
|
||||||
|
19
scripts/docs/processors/remove-private-members.js
Normal file
19
scripts/docs/processors/remove-private-members.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
module.exports = function removePrivateMembers() {
|
||||||
|
return {
|
||||||
|
name: 'remove-private-members',
|
||||||
|
description: 'Remove member docs with @private tags',
|
||||||
|
$runAfter: ['tags-parsed'],
|
||||||
|
$runBefore: ['rendering-docs'],
|
||||||
|
$process: function(docs) {
|
||||||
|
docs.forEach(function(doc){
|
||||||
|
if (doc.members) {
|
||||||
|
doc.members = doc.members.filter(function(member){
|
||||||
|
return !member.tags.tagsByName.get("private");
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return docs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
2
scripts/docs/templates/common.template.html
vendored
2
scripts/docs/templates/common.template.html
vendored
@ -125,7 +125,7 @@ defined in <$ githubViewLink(doc) $>
|
|||||||
<@ endfor @>
|
<@ endfor @>
|
||||||
<@ endif -@>
|
<@ endif -@>
|
||||||
|
|
||||||
<@- if doc.members @>
|
<@- if doc.members and doc.members.length @>
|
||||||
## Members
|
## Members
|
||||||
<@- for method in doc.members @>
|
<@- for method in doc.members @>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user