mirror of
https://github.com/jsdoc/jsdoc.git
synced 2026-02-01 16:45:41 +00:00
Added support for @ignore.
This commit is contained in:
parent
47fc4cb4b9
commit
2a88396780
@ -7,6 +7,13 @@
|
||||
|
||||
doclets = exports.doclets = [];
|
||||
|
||||
/** @method */
|
||||
doclets.addDoclet = function(doclet) {
|
||||
if (!doclet.hasTag('ignore')) {
|
||||
this.push(doclet);
|
||||
}
|
||||
}
|
||||
|
||||
/** @method */
|
||||
doclets.getDocsByPath = function(docName) {
|
||||
var foundDocs = [],
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
thisDoclet = doclet.makeDoclet(commentSrc, comment, currentSourceName);
|
||||
|
||||
if ( thisDoclet.hasTag('name') && thisDoclet.hasTag('isa') ) {
|
||||
doclets.push(thisDoclet);
|
||||
doclets.addDoclet(thisDoclet);
|
||||
if (thisDoclet.tagValue('isa') === 'module') {
|
||||
name.setCurrentModule( thisDoclet.tagValue('path') );
|
||||
}
|
||||
@ -46,7 +46,7 @@
|
||||
if (thisDoclet.hasTag('isa') && !thisDocletName) {
|
||||
thisDoclet.setName('' + node.name);
|
||||
|
||||
doclets.push(thisDoclet);
|
||||
doclets.addDoclet(thisDoclet);
|
||||
}
|
||||
|
||||
name.refs.push([node, thisDoclet]);
|
||||
@ -72,7 +72,7 @@
|
||||
if (thisDoclet.hasTag('isa') && !thisDocletName) {
|
||||
nodeName = name.resolveThis( nodeName, node, thisDoclet );
|
||||
thisDoclet.setName(nodeName);
|
||||
doclets.push(thisDoclet);
|
||||
doclets.addDoclet(thisDoclet);
|
||||
}
|
||||
name.refs.push([node.right, thisDoclet]);
|
||||
}
|
||||
@ -97,7 +97,7 @@
|
||||
if (thisDoclet.hasTag('isa') && !thisDocletName ) {
|
||||
thisDocletName = n.target.string;
|
||||
thisDoclet.setName(thisDocletName);
|
||||
doclets.push(thisDoclet);
|
||||
doclets.addDoclet(thisDoclet);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
11
test/samples/tag_ignore.js
Normal file
11
test/samples/tag_ignore.js
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
/**
|
||||
@ignore
|
||||
@name Foo
|
||||
@constructor
|
||||
*/
|
||||
|
||||
/**
|
||||
@name Bar
|
||||
@constructor
|
||||
*/
|
||||
Loading…
x
Reference in New Issue
Block a user