mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Added support for the @ignore tag.
This commit is contained in:
parent
71e60860d9
commit
41b626ce88
2
main.js
2
main.js
@ -159,7 +159,7 @@ function main() {
|
||||
require('jsdoc/src/handlers').attachTo(app.jsdoc.parser);
|
||||
|
||||
docs = app.jsdoc.parser.parse(sourceFiles, env.opts.encoding);
|
||||
dump(docs); exit(0);
|
||||
//dump(docs); exit(0);
|
||||
if (env.opts.expel) {
|
||||
dump(docs);
|
||||
exit(0);
|
||||
|
||||
@ -171,6 +171,15 @@
|
||||
}
|
||||
});
|
||||
|
||||
dictionary.defineTag('ignore', {
|
||||
mustNotHaveValue: true,
|
||||
onTagged: function(doclet, tag) {
|
||||
doclet.ignore = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
dictionary.defineTag('inner', {
|
||||
onTagged: function(doclet, tag) {
|
||||
setDocletScopeToTitle(doclet, tag);
|
||||
|
||||
6
test/cases/ignoretag.js
Normal file
6
test/cases/ignoretag.js
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
@ignore
|
||||
*/
|
||||
function foo(x) {
|
||||
|
||||
}
|
||||
@ -95,6 +95,7 @@ testFile('test/t/cases/copyrighttag.js');
|
||||
testFile('test/t/cases/deprecatedtag.js');
|
||||
testFile('test/t/cases/exceptiontag.js');
|
||||
testFile('test/t/cases/globaltag.js');
|
||||
testFile('test/t/cases/ignoretag.js');
|
||||
|
||||
report();
|
||||
|
||||
|
||||
11
test/t/cases/ignoretag.js
Normal file
11
test/t/cases/ignoretag.js
Normal file
@ -0,0 +1,11 @@
|
||||
(function() {
|
||||
var docSet = testhelpers.getDocSetFromFile('test/cases/ignoretag.js'),
|
||||
foo = docSet.getByLongname('foo')[0];
|
||||
|
||||
//dump(docSet.doclets);
|
||||
|
||||
test('When a symbol has an @ignore tag, the doclet has a ignore property set to true.', function() {
|
||||
assert.equal(foo.ignore, true);
|
||||
});
|
||||
|
||||
})();
|
||||
Loading…
x
Reference in New Issue
Block a user