remove author tags, and clean up JSDoc comments without leading asterisks

Most of the existing author tags are grossly out of date at this point. The definitive reference for who has contributed what is available at https://github.com/jsdoc3/jsdoc/graphs/contributors.
This commit is contained in:
Jeff Williams 2017-07-06 00:01:11 -07:00
parent a097e2f299
commit 8b26b6d669
36 changed files with 185 additions and 251 deletions

View File

@ -1,11 +1,6 @@
#!/usr/bin/env node #!/usr/bin/env node
/* global require: true */ /* global require: true */
/* eslint strict: ["error", "function"] */ /* eslint strict: ["error", "function"] */
/**
* @project jsdoc
* @author Michael Mathews <micmath@gmail.com>
* @license See LICENSE.md file included in this distribution.
*/
// initialize the environment for Node.js // initialize the environment for Node.js
(function() { (function() {

View File

@ -1,8 +1,6 @@
/** /**
A collection of functions relating to resolving @borrows tags in JSDoc symbols. * A collection of functions relating to resolving @borrows tags in JSDoc symbols.
@module jsdoc/borrow * @module jsdoc/borrow
@author Michael Mathews <micmath@gmail.com>
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';

View File

@ -1,11 +1,5 @@
/** /**
@overview * @module jsdoc/config
@author Michael Mathews <micmath@gmail.com>
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/
/**
@module jsdoc/config
*/ */
'use strict'; 'use strict';
@ -46,10 +40,10 @@ var defaults = {
}; };
/** /**
@class * @class
@classdesc Represents a JSDoc application configuration. * @classdesc Represents a JSDoc application configuration.
@param {(string|object)} [jsonOrObject] - The contents of config.json, or a JavaScript object * @param {(string|object)} [jsonOrObject] - The contents of config.json, or a JavaScript object
exported from a .js config file. * exported from a .js config file.
*/ */
function Config(jsonOrObject) { function Config(jsonOrObject) {
if (typeof jsonOrObject === 'undefined') { if (typeof jsonOrObject === 'undefined') {
@ -70,7 +64,7 @@ function Config(jsonOrObject) {
module.exports = Config; module.exports = Config;
/** /**
Get the merged configuration values. * Get the merged configuration values.
*/ */
Config.prototype.get = function() { Config.prototype.get = function() {
return this._config; return this._config;

View File

@ -1,9 +1,3 @@
/**
* @overview
* @author Michael Mathews <micmath@gmail.com>
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/
/** /**
* @module jsdoc/doclet * @module jsdoc/doclet
*/ */

View File

@ -1,8 +1,6 @@
/** /**
A collection of functions relating to JSDoc symbol name manipulation. * A collection of functions relating to JSDoc symbol name manipulation.
@module jsdoc/name * @module jsdoc/name
@author Michael Mathews <micmath@gmail.com>
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';
@ -84,8 +82,8 @@ function prototypeToPunc(name) {
// TODO: deprecate exports.resolve in favor of a better name // TODO: deprecate exports.resolve in favor of a better name
/** /**
Resolves the longname, memberof, variation and name values of the given doclet. * Resolves the longname, memberof, variation and name values of the given doclet.
@param {module:jsdoc/doclet.Doclet} doclet * @param {module:jsdoc/doclet.Doclet} doclet
*/ */
exports.resolve = function(doclet) { exports.resolve = function(doclet) {
var about = {}; var about = {};
@ -197,10 +195,9 @@ exports.resolve = function(doclet) {
}; };
/** /**
@method module:jsdoc/name.applyNamespace * @param {string} longname The full longname of the symbol.
@param {string} longname The full longname of the symbol. * @param {string} ns The namespace to be applied.
@param {string} ns The namespace to be applied. * @returns {string} The longname with the namespace applied.
@returns {string} The longname with the namespace applied.
*/ */
exports.applyNamespace = function(longname, ns) { exports.applyNamespace = function(longname, ns) {
var nameParts = exports.shorten(longname); var nameParts = exports.shorten(longname);
@ -331,11 +328,11 @@ function atomize(longname, sliceChars, forcedMemberof) {
// TODO: deprecate exports.shorten in favor of a better name // TODO: deprecate exports.shorten in favor of a better name
/** /**
Given a longname like "a.b#c(2)", slice it up into an object * Given a longname like "a.b#c(2)", slice it up into an object containing the memberof, the scope,
containing the memberof, the scope, the name, and variation. * the name, and variation.
@param {string} longname * @param {string} longname
@param {string} forcedMemberof * @param {string} forcedMemberof
@returns {object} Representing the properties of the given name. * @returns {object} Representing the properties of the given name.
*/ */
exports.shorten = function(longname, forcedMemberof) { exports.shorten = function(longname, forcedMemberof) {
return atomize(longname, SCOPE_PUNC, forcedMemberof); return atomize(longname, SCOPE_PUNC, forcedMemberof);
@ -428,11 +425,11 @@ exports.longnamesToTree = function longnamesToTree(longnames, doclets) {
}; };
/** /**
Split a string that starts with a name and ends with a description into its parts. * Split a string that starts with a name and ends with a description into its parts. Allows the
Allows the defaultvalue (if present) to contain brackets. If the name is found to have * defaultvalue (if present) to contain brackets. If the name is found to have mismatched brackets,
mismatched brackets, null is returned. * null is returned.
@param {string} nameDesc * @param {string} nameDesc
@returns {object} Hash with "name" and "description" properties. * @returns {object} Hash with "name" and "description" properties.
*/ */
function splitNameMatchingBrackets(nameDesc) { function splitNameMatchingBrackets(nameDesc) {
var buffer = []; var buffer = [];
@ -476,9 +473,9 @@ function splitNameMatchingBrackets(nameDesc) {
// TODO: deprecate exports.splitName in favor of a better name // TODO: deprecate exports.splitName in favor of a better name
/** /**
Split a string that starts with a name and ends with a description into its parts. * Split a string that starts with a name and ends with a description into its parts.
@param {string} nameDesc * @param {string} nameDesc
@returns {object} Hash with "name" and "description" properties. * @returns {object} Hash with "name" and "description" properties.
*/ */
exports.splitName = function(nameDesc) { exports.splitName = function(nameDesc) {
// like: name, [name], name text, [name] text, name - text, or [name] - text // like: name, [name], name text, [name] text, name - text, or [name] - text

View File

@ -1,8 +1,6 @@
/** /**
* Parse the command line arguments. * Parse the command line arguments.
* @module jsdoc/opts/argparser * @module jsdoc/opts/argparser
* @author Michael Mathews <micmath@gmail.com>
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';

View File

@ -1,8 +1,6 @@
/** /**
* @module jsdoc/opts/args * @module jsdoc/opts/args
* @requires jsdoc/opts/argparser * @requires jsdoc/opts/argparser
* @author Michael Mathews <micmath@gmail.com>
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';

View File

@ -1,8 +1,6 @@
/** /**
* Make the contents of a README file available to include in the output. * Make the contents of a README file available to include in the output.
* @module jsdoc/readme * @module jsdoc/readme
* @author Michael Mathews <micmath@gmail.com>
* @author Ben Blank <ben.blank@gmail.com>
*/ */
'use strict'; 'use strict';

View File

@ -1,9 +1,6 @@
/** /**
* @overview Schema for validating JSDoc doclets. * Schema for validating JSDoc doclets.
* * @module jsdoc/schema
* @author Michael Mathews <micmath@gmail.com>
* @author Jeff Williams <jeffrey.l.williams@gmail.com>
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
* @see <http://tools.ietf.org/html/draft-zyp-json-schema-03> * @see <http://tools.ietf.org/html/draft-zyp-json-schema-03>
*/ */
'use strict'; 'use strict';

View File

@ -1,8 +1,5 @@
/** /**
@module jsdoc/src/filter * @module jsdoc/src/filter
@author Michael Mathews <micmath@gmail.com>
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';
@ -20,11 +17,11 @@ function makeRegExp(config) {
} }
/** /**
@constructor * @constructor
@param {object} opts * @param {Object} opts
@param {string[]} opts.exclude - Specific files to exclude. * @param {string[]} opts.exclude - Specific files to exclude.
@param {string|RegExp} opts.includePattern * @param {(string|RegExp)} opts.includePattern
@param {string|RegExp} opts.excludePattern * @param {(string|RegExp)} opts.excludePattern
*/ */
exports.Filter = function(opts) { exports.Filter = function(opts) {
this.exclude = opts.exclude && Array.isArray(opts.exclude) ? this.exclude = opts.exclude && Array.isArray(opts.exclude) ?
@ -37,8 +34,8 @@ exports.Filter = function(opts) {
}; };
/** /**
@param {string} filepath - The filepath to check. * @param {string} filepath - The filepath to check.
@returns {boolean} Should the given file be included? * @returns {boolean} Should the given file be included?
*/ */
exports.Filter.prototype.isIncluded = function(filepath) { exports.Filter.prototype.isIncluded = function(filepath) {
var included = true; var included = true;

View File

@ -1,9 +1,6 @@
/** /**
@module jsdoc/src/scanner * @module jsdoc/src/scanner
@requires module:fs * @requires module:jsdoc/fs
@author Michael Mathews <micmath@gmail.com>
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';
@ -14,18 +11,18 @@ var path = require('jsdoc/path');
/* eslint-disable no-empty-function */ /* eslint-disable no-empty-function */
/** /**
@constructor * @constructor
@mixes module:events * @mixes module:events
*/ */
exports.Scanner = function() {}; exports.Scanner = function() {};
/* eslint-enable no-empty-function */ /* eslint-enable no-empty-function */
exports.Scanner.prototype = Object.create( require('events').EventEmitter.prototype ); exports.Scanner.prototype = Object.create( require('events').EventEmitter.prototype );
/** /**
Recursively searches the given searchPaths for js files. * Recursively searches the given searchPaths for js files.
@param {Array.<string>} searchPaths * @param {Array.<string>} searchPaths
@param {number} [depth=1] * @param {number} [depth=1]
@fires sourceFileFound * @fires sourceFileFound
*/ */
exports.Scanner.prototype.scan = function(searchPaths, depth, filter) { exports.Scanner.prototype.scan = function(searchPaths, depth, filter) {
var currentFile; var currentFile;

View File

@ -1,15 +1,13 @@
/** /**
@overview * Functionality related to JSDoc tags.
@author Michael Mathews <micmath@gmail.com> * @module jsdoc/tag
@license Apache License 2.0 - See file 'LICENSE.md' in this project. * @requires module:jsdoc/env
*/ * @requires module:jsdoc/path
* @requires module:jsdoc/tag/dictionary
/** * @requires module:jsdoc/tag/validator
Functionality related to JSDoc tags. * @requires module:jsdoc/tag/type
@module jsdoc/tag * @requires module:jsdoc/util/logger
@requires jsdoc/tag/dictionary * @requires module:util
@requires jsdoc/tag/validator
@requires jsdoc/tag/type
*/ */
'use strict'; 'use strict';

View File

@ -1,9 +1,6 @@
/** /**
Define tags that are known in JSDoc. * Define tags that are known in JSDoc.
@module jsdoc/tag/dictionary/definitions * @module jsdoc/tag/dictionary/definitions
@author Michael Mathews <micmath@gmail.com>
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';

View File

@ -1,8 +1,5 @@
/** /**
* @module jsdoc/tag/inline * @module jsdoc/tag/inline
*
* @author Jeff Williams <jeffrey.l.williams@gmail.com>
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';

View File

@ -1,9 +1,5 @@
/** /**
* @module jsdoc/tag/type * @module jsdoc/tag/type
*
* @author Michael Mathews <micmath@gmail.com>
* @author Jeff Williams <jeffrey.l.williams@gmail.com>
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';

View File

@ -1,9 +1,6 @@
/** /**
@module jsdoc/tag/validator * @module jsdoc/tag/validator
@requires jsdoc/tag/dictionary * @requires jsdoc/tag/dictionary
@author Michael Mathews <micmath@gmail.com>
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';

View File

@ -1,8 +1,6 @@
/** /**
* @file Wrapper for underscore's template utility to allow loading templates from files. * Wrapper for underscore's template utility to allow loading templates from files.
* @author Rafał Wrzeszcz <rafal.wrzeszcz@wrzasq.pl> * @module jsdoc/template
* @author <a href="mailto:matthewkastor@gmail.com">Matthew Christopher Kastor-Inare III</a>
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';
@ -11,13 +9,9 @@ var _ = require('underscore'),
path = require('path'); path = require('path');
/** /**
@module jsdoc/template * @class
*/ * @classdesc Underscore template helper.
* @param {string} filepath - Templates directory.
/**
@class
@classdesc Underscore template helper.
@param {string} filepath - Templates directory.
*/ */
exports.Template = function(filepath) { exports.Template = function(filepath) {
this.path = filepath; this.path = filepath;
@ -31,22 +25,23 @@ exports.Template = function(filepath) {
}; };
}; };
/** Loads template from given file. /**
@param {string} file - Template filename. * Loads template from given file.
@return {function} Returns template closure. * @param {string} file - Template filename.
* @return {function} Returns template closure.
*/ */
exports.Template.prototype.load = function(file) { exports.Template.prototype.load = function(file) {
return _.template(fs.readFileSync(file, 'utf8'), null, this.settings); return _.template(fs.readFileSync(file, 'utf8'), null, this.settings);
}; };
/** /**
Renders template using given data. * Renders template using given data.
*
This is low-level function, for rendering full templates use {@link Template.render()}. * This is low-level function, for rendering full templates use {@link Template.render()}.
*
@param {string} file - Template filename. * @param {string} file - Template filename.
@param {object} data - Template variables (doesn't have to be object, but passing variables dictionary is best way and most common use). * @param {object} data - Template variables (doesn't have to be object, but passing variables dictionary is best way and most common use).
@return {string} Rendered template. * @return {string} Rendered template.
*/ */
exports.Template.prototype.partial = function(file, data) { exports.Template.prototype.partial = function(file, data) {
file = path.resolve(this.path, file); file = path.resolve(this.path, file);
@ -61,13 +56,13 @@ exports.Template.prototype.partial = function(file, data) {
}; };
/** /**
Renders template with given data. * Renders template with given data.
*
This method automaticaly applies layout if set. * This method automaticaly applies layout if set.
*
@param {string} file - Template filename. * @param {string} file - Template filename.
@param {object} data - Template variables (doesn't have to be object, but passing variables dictionary is best way and most common use). * @param {object} data - Template variables (doesn't have to be object, but passing variables dictionary is best way and most common use).
@return {string} Rendered template. * @return {string} Rendered template.
*/ */
exports.Template.prototype.render = function(file, data) { exports.Template.prototype.render = function(file, data) {
// main content // main content

View File

@ -1,7 +1,5 @@
/** /**
@overview * @module jsdoc/tutorial
@author Rafał Wrzeszcz <rafal.wrzeszcz@wrzasq.pl>
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';
@ -10,10 +8,12 @@ var util = require('util');
var hasOwnProp = Object.prototype.hasOwnProperty; var hasOwnProp = Object.prototype.hasOwnProperty;
/** Removes child tutorial from the parent. Does *not* unset child.parent though. /**
@param {Tutorial} parent - parent tutorial. * Removes child tutorial from the parent. Does *not* unset child.parent though.
@param {Tutorial} child - Old child. *
@private * @param {Tutorial} parent - parent tutorial.
* @param {Tutorial} child - Old child.
* @private
*/ */
function removeChild(parent, child) { function removeChild(parent, child) {
var index = parent.children.indexOf(child); var index = parent.children.indexOf(child);
@ -23,25 +23,23 @@ function removeChild(parent, child) {
} }
} }
/** Adds a child to the parent tutorial. Does *not* set child.parent though. /**
@param {Tutorial} parent - parent tutorial. * Adds a child to the parent tutorial. Does *not* set child.parent though.
@param {Tutorial} child - New child. *
@private * @param {Tutorial} parent - parent tutorial.
* @param {Tutorial} child - New child.
* @private
*/ */
function addChild(parent, child) { function addChild(parent, child) {
parent.children.push(child); parent.children.push(child);
} }
/** /**
@module jsdoc/tutorial * @class
*/ * @classdesc Represents a single JSDoc tutorial.
* @param {string} name - Tutorial name.
/** * @param {string} content - Text content.
@class * @param {number} type - Source formating.
@classdesc Represents a single JSDoc tutorial.
@param {string} name - Tutorial name.
@param {string} content - Text content.
@param {number} type - Source formating.
*/ */
exports.Tutorial = function(name, content, type) { exports.Tutorial = function(name, content, type) {
this.title = this.name = this.longname = name; this.title = this.name = this.longname = name;
@ -53,8 +51,10 @@ exports.Tutorial = function(name, content, type) {
this.children = []; this.children = [];
}; };
/** Moves children from current parent to different one. /**
@param {?Tutorial} parent - New parent. If null, the tutorial has no parent. * Moves children from current parent to different one.
*
* @param {?Tutorial} parent - New parent. If null, the tutorial has no parent.
*/ */
exports.Tutorial.prototype.setParent = function(parent) { exports.Tutorial.prototype.setParent = function(parent) {
// removes node from old parent // removes node from old parent
@ -68,22 +68,28 @@ exports.Tutorial.prototype.setParent = function(parent) {
} }
}; };
/** Removes children from current node. /**
@param {Tutorial} child - Old child. * Removes children from current node.
*
* @param {Tutorial} child - Old child.
*/ */
exports.Tutorial.prototype.removeChild = function(child) { exports.Tutorial.prototype.removeChild = function(child) {
child.setParent(null); child.setParent(null);
}; };
/** Adds new children to current node. /**
@param {Tutorial} child - New child. * Adds new children to current node.
*
* @param {Tutorial} child - New child.
*/ */
exports.Tutorial.prototype.addChild = function(child) { exports.Tutorial.prototype.addChild = function(child) {
child.setParent(this); child.setParent(this);
}; };
/** Prepares source. /**
@return {string} HTML source. * Prepares source.
*
* @return {string} HTML source.
*/ */
exports.Tutorial.prototype.parse = function() { exports.Tutorial.prototype.parse = function() {
switch (this.type) { switch (this.type) {
@ -133,8 +139,10 @@ exports.RootTutorial.prototype._addTutorial = function(child) {
this._tutorials[child.name] = child; this._tutorials[child.name] = child;
}; };
/** Tutorial source types. /**
@enum {number} * Tutorial source types.
*
* @enum {number}
*/ */
exports.TYPES = { exports.TYPES = {
HTML: 1, HTML: 1,

View File

@ -1,11 +1,5 @@
/** /**
@overview * @module jsdoc/tutorial/resolver
@author Rafa&#322; Wrzeszcz <rafal.wrzeszcz@wrzasq.pl>
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/
/**
@module jsdoc/tutorial/resolver
*/ */
'use strict'; 'use strict';
@ -38,22 +32,20 @@ function isTutorialJSON(json) {
*/ */
exports.root = new tutorial.RootTutorial(); exports.root = new tutorial.RootTutorial();
/** Helper function that adds tutorial configuration to the `conf` variable. /**
* This helps when multiple tutorial configurations are specified in one object, * Helper function that adds tutorial configuration to the `conf` variable. This helps when multiple
* or when a tutorial's children are specified as tutorial configurations as * tutorial configurations are specified in one object, or when a tutorial's children are specified
* opposed to an array of tutorial names. * as tutorial configurations as opposed to an array of tutorial names.
* *
* Recurses as necessary to ensure all tutorials are added. * Recurses as necessary to ensure all tutorials are added.
* *
* @param {string} name - if `meta` is a configuration for a single tutorial, * @param {string} name - if `meta` is a configuration for a single tutorial, this is that
* this is that tutorial's name. * tutorial's name.
* @param {object} meta - object that contains tutorial information. * @param {object} meta - object that contains tutorial information. Can either be for a single
* Can either be for a single tutorial, or for multiple * tutorial, or for multiple (where each key in `meta` is the tutorial name and each value is the
* (where each key in `meta` is the tutorial name and each * information for a single tutorial). Additionally, a tutorial's 'children' property may either be
* value is the information for a single tutorial). * an array of strings (names of the child tutorials), OR an object giving the configuration for the
* Additionally, a tutorial's 'children' property may * child tutorials.
* either be an array of strings (names of the child tutorials),
* OR an object giving the configuration for the child tutorials.
*/ */
function addTutorialConf(name, meta) { function addTutorialConf(name, meta) {
var i; var i;
@ -158,7 +150,8 @@ exports.load = function(filepath) {
}); });
}; };
/** Resolves hierarchical structure. /**
* Resolves hierarchical structure.
*/ */
exports.resolve = function() { exports.resolve = function() {
var item; var item;

View File

@ -2,8 +2,6 @@
/** /**
* Recursively print out all names and values in a data structure. * Recursively print out all names and values in a data structure.
* @module jsdoc/util/dumper * @module jsdoc/util/dumper
* @author Michael Mathews <micmath@gmail.com>
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
*/ */
'use strict'; 'use strict';

View File

@ -1,8 +1,6 @@
/** /**
* Provides access to Markdown-related functions. * Provides access to Markdown-related functions.
* @module jsdoc/util/markdown * @module jsdoc/util/markdown
* @author Michael Mathews <micmath@gmail.com>
* @author Ben Blank <ben.blank@gmail.com>
*/ */
'use strict'; 'use strict';

View File

@ -1,8 +1,8 @@
/* eslint-disable spaced-comment */ /* eslint-disable spaced-comment */
/** /**
@overview Demonstrate how to modify the source code before the parser sees it. * Demonstrate how to modify the source code before the parser sees it.
@module plugins/commentConvert *
@author Michael Mathews <micmath@gmail.com> * @module plugins/commentConvert
*/ */
'use strict'; 'use strict';

View File

@ -1,9 +1,7 @@
/** /**
* @overview Remove everything in a file except JSDoc-style comments. By enabling this plugin, you * Remove everything in a file except JSDoc-style comments. By enabling this plugin, you can
* can document source files that are not valid JavaScript (including source files for other * document source files that are not valid JavaScript (including source files for other languages).
* languages).
* @module plugins/commentsOnly * @module plugins/commentsOnly
* @author Jeff Williams <jeffrey.l.williams@gmail.com>
*/ */
'use strict'; 'use strict';

View File

@ -1,14 +1,13 @@
/** /**
@overview Escape HTML tags in descriptions. * Escape HTML tags in descriptions.
@module plugins/escapeHtml *
@author Michael Mathews <micmath@gmail.com> * @module plugins/escapeHtml
*/ */
'use strict'; 'use strict';
exports.handlers = { exports.handlers = {
/** /**
Translate HTML tags in descriptions into safe entities. * Translate HTML tags in descriptions into safe entities. Replaces <, & and newlines
Replaces <, & and newlines
*/ */
newDoclet: function(e) { newDoclet: function(e) {
if (e.doclet.description) { if (e.doclet.description) {

View File

@ -1,7 +1,7 @@
/** /**
* @overview Dump information about parser events to the console. * Dump information about parser events to the console.
*
* @module plugins/eventDumper * @module plugins/eventDumper
* @author Jeff Williams <jeffrey.l.williams@gmail.com>
*/ */
'use strict'; 'use strict';

View File

@ -1,8 +1,7 @@
/** /**
* @overview Translate doclet descriptions from MarkDown into HTML. * Translate doclet descriptions from Markdown into HTML.
*
* @module plugins/markdown * @module plugins/markdown
* @author Michael Mathews <micmath@gmail.com>
* @author Ben Blank <ben.blank@gmail.com>
*/ */
'use strict'; 'use strict';
@ -36,10 +35,10 @@ function shouldProcessString(tagName, text) {
} }
/** /**
* Process the markdown source in a doclet. The properties that should be * Process the markdown source in a doclet. The properties that should be processed are
* processed are configurable, but always include "classdesc", "description", * configurable, but always include "author", "classdesc", "description", "exceptions", "params",
* "params", "properties", and "returns". Handled properties can be bare * "properties", "returns", and "see". Handled properties can be bare strings, objects, or arrays
* strings, objects, or arrays of objects. * of objects.
*/ */
function process(doclet) { function process(doclet) {
tags.forEach(function(tag) { tags.forEach(function(tag) {
@ -81,7 +80,7 @@ defaultTags.forEach(function(tag) {
exports.handlers = { exports.handlers = {
/** /**
* Translate markdown syntax in a new doclet's description into HTML. Is run * Translate Markdown syntax in a new doclet's description into HTML. Is run
* by JSDoc 3 whenever a "newDoclet" event fires. * by JSDoc 3 whenever a "newDoclet" event fires.
*/ */
newDoclet: function(e) { newDoclet: function(e) {

View File

@ -33,8 +33,6 @@
* will assign numeric variations instead, starting at `(1)` and counting upwards. * will assign numeric variations instead, starting at `(1)` and counting upwards.
* *
* @module plugins/overloadHelper * @module plugins/overloadHelper
* @author Jeff Williams <jeffrey.l.williams@gmail.com>
* @license Apache License 2.0
*/ */
'use strict'; 'use strict';

View File

@ -1,7 +1,7 @@
/** /**
@overview Adds support for reusable partial jsdoc files. * Adds support for reusable partial jsdoc files.
@module plugins/partial *
@author Ludo Antonov <ludo@hulu.com> * @module plugins/partial
*/ */
'use strict'; 'use strict';

View File

@ -1,13 +1,14 @@
/** /**
@overview Strips the rails template tags from a js.erb file * Strips the rails template tags from a js.erb file
@module plugins/railsTemplate *
@author Jannon Frank <jannon@jannon.net> * @module plugins/railsTemplate
*/ */
'use strict'; 'use strict';
exports.handlers = { exports.handlers = {
/** /**
* Remove rails tags from the source input (e.g. <% foo bar %>) * Remove rails tags from the source input (e.g. <% foo bar %>)
*
* @param e * @param e
* @param e.filename * @param e.filename
* @param e.source * @param e.source

View File

@ -1,13 +1,13 @@
/** /**
@overview This is just an example. * This is just an example.
@module plugins/shout *
@author Michael Mathews <micmath@gmail.com> * @module plugins/shout
*/ */
'use strict'; 'use strict';
exports.handlers = { exports.handlers = {
/** /**
Make your descriptions more shoutier. * Make your descriptions more shoutier.
*/ */
newDoclet: function(e) { newDoclet: function(e) {
if (typeof e.doclet.description === 'string') { if (typeof e.doclet.description === 'string') {

View File

@ -1,6 +1,5 @@
/** /**
@module plugins/sourcetag * @module plugins/sourcetag
@author Michael Mathews <micmath@gmail.com>
*/ */
'use strict'; 'use strict';
@ -8,15 +7,17 @@ var logger = require('jsdoc/util/logger');
exports.handlers = { exports.handlers = {
/** /**
Support @source tag. Expected value like: * Support @source tag. Expected value like:
{ "filename": "myfile.js", "lineno": 123 } *
Modifies the corresponding meta values on the given doclet. * { "filename": "myfile.js", "lineno": 123 }
*
WARNING: If you are using a JSDoc template that generates pretty-printed source files, * Modifies the corresponding meta values on the given doclet.
such as JSDoc's default template, this plugin can cause JSDoc to crash. To fix this issue, *
update your template settings to disable pretty-printed source files. * WARNING: If you are using a JSDoc template that generates pretty-printed source files,
* such as JSDoc's default template, this plugin can cause JSDoc to crash. To fix this issue,
@source { "filename": "sourcetag.js", "lineno": 13 } * update your template settings to disable pretty-printed source files.
*
* @source { "filename": "sourcetag.js", "lineno": 9 }
*/ */
newDoclet: function(e) { newDoclet: function(e) {
var tags = e.doclet.tags; var tags = e.doclet.tags;

View File

@ -1,8 +1,7 @@
/** /**
* @overview This plugin creates a summary tag, if missing, from the first sentence in the * This plugin creates a summary tag, if missing, from the first sentence in the description.
* description. *
* @module plugins/summarize * @module plugins/summarize
* @author Mads Bondo Dydensborg <mbd@dbc.dk>
*/ */
'use strict'; 'use strict';

View File

@ -1,7 +1,7 @@
/** /**
@overview Strips the rails template tags from a js.erb file * Strips the rails template tags from a js.erb file
@module plugins/railsTemplate *
@author Jannon Frank <jannon@jannon.net> * @module plugins/railsTemplate
*/ */
exports.handlers = { exports.handlers = {
@ -16,4 +16,4 @@ exports.handlers = {
e.source = e.source.replace(/<%.*%> /g, ""); e.source = e.source.replace(/<%.*%> /g, "");
} }
} }
}; };

View File

@ -8,13 +8,13 @@ describe('escapeHtml plugin', function() {
var parser = jasmine.createParser(); var parser = jasmine.createParser();
var pluginPath = 'plugins/escapeHtml'; var pluginPath = 'plugins/escapeHtml';
var pluginPathResolved = path.join(env.dirname, pluginPath); var pluginPathResolved = path.join(env.dirname, pluginPath);
var plugin = require(pluginPathResolved);
require('jsdoc/plugins').installPlugins([pluginPathResolved], parser); require('jsdoc/plugins').installPlugins([pluginPathResolved], parser);
docSet = jasmine.getDocSetFromFile(pluginPath + '.js', parser); docSet = jasmine.getDocSetFromFile(pluginPath + '.js', parser);
it("should escape '&', '<' and newlines in doclet descriptions", function() { it("should escape '&', '<' and newlines in doclet descriptions", function() {
var doclet = docSet.getByLongname('module:plugins/escapeHtml.handlers.newDoclet'); var doclet = docSet.getByLongname('module:plugins/escapeHtml.handlers.newDoclet');
expect(doclet[0].description).toEqual('Translate HTML tags in descriptions into safe entities.<br> Replaces &lt;, &amp; and newlines');
expect(doclet[0].description).toEqual('Translate HTML tags in descriptions into safe entities. Replaces &lt;, &amp; and newlines');
}); });
}); });

View File

@ -8,15 +8,15 @@ describe('sourcetag plugin', function() {
var parser = jasmine.createParser(); var parser = jasmine.createParser();
var pluginPath = 'plugins/sourcetag'; var pluginPath = 'plugins/sourcetag';
var pluginPathResolved = path.join(env.dirname, pluginPath); var pluginPathResolved = path.join(env.dirname, pluginPath);
var plugin = require(pluginPathResolved);
require('jsdoc/plugins').installPlugins([pluginPathResolved], parser); require('jsdoc/plugins').installPlugins([pluginPathResolved], parser);
docSet = jasmine.getDocSetFromFile(pluginPath + '.js', parser); docSet = jasmine.getDocSetFromFile(pluginPath + '.js', parser);
it("should set the lineno and filename of the doclet's meta property", function() { it("should set the lineno and filename of the doclet's meta property", function() {
var doclet = docSet.getByLongname('module:plugins/sourcetag.handlers.newDoclet'); var doclet = docSet.getByLongname('module:plugins/sourcetag.handlers.newDoclet');
expect(doclet[0].meta).toBeDefined(); expect(doclet[0].meta).toBeDefined();
expect(doclet[0].meta.filename).toEqual('sourcetag.js'); expect(doclet[0].meta.filename).toEqual('sourcetag.js');
expect(doclet[0].meta.lineno).toEqual(13); expect(doclet[0].meta.lineno).toEqual(9);
}); });
}); });

View File

@ -6,7 +6,6 @@
* automatically hides them. * automatically hides them.
* *
* @module plugins/underscore * @module plugins/underscore
* @author Daniel Ellis <coug36@gmail.com>
*/ */
exports.handlers = { exports.handlers = {