diff --git a/jsdoc.js b/jsdoc.js index 4eb3c9b9..154cbb49 100755 --- a/jsdoc.js +++ b/jsdoc.js @@ -1,11 +1,6 @@ #!/usr/bin/env node /* global require: true */ /* eslint strict: ["error", "function"] */ -/** - * @project jsdoc - * @author Michael Mathews - * @license See LICENSE.md file included in this distribution. - */ // initialize the environment for Node.js (function() { diff --git a/lib/jsdoc/borrow.js b/lib/jsdoc/borrow.js index a0404476..dd664fd7 100644 --- a/lib/jsdoc/borrow.js +++ b/lib/jsdoc/borrow.js @@ -1,8 +1,6 @@ /** - A collection of functions relating to resolving @borrows tags in JSDoc symbols. - @module jsdoc/borrow - @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. + * A collection of functions relating to resolving @borrows tags in JSDoc symbols. + * @module jsdoc/borrow */ 'use strict'; diff --git a/lib/jsdoc/config.js b/lib/jsdoc/config.js index 7617b45c..333b7276 100644 --- a/lib/jsdoc/config.js +++ b/lib/jsdoc/config.js @@ -1,11 +1,5 @@ /** - @overview - @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. - */ - -/** - @module jsdoc/config + * @module jsdoc/config */ 'use strict'; @@ -46,10 +40,10 @@ var defaults = { }; /** - @class - @classdesc Represents a JSDoc application configuration. - @param {(string|object)} [jsonOrObject] - The contents of config.json, or a JavaScript object - exported from a .js config file. + * @class + * @classdesc Represents a JSDoc application configuration. + * @param {(string|object)} [jsonOrObject] - The contents of config.json, or a JavaScript object + * exported from a .js config file. */ function Config(jsonOrObject) { if (typeof jsonOrObject === 'undefined') { @@ -70,7 +64,7 @@ function Config(jsonOrObject) { module.exports = Config; /** - Get the merged configuration values. + * Get the merged configuration values. */ Config.prototype.get = function() { return this._config; diff --git a/lib/jsdoc/doclet.js b/lib/jsdoc/doclet.js index efc45225..da153a9c 100644 --- a/lib/jsdoc/doclet.js +++ b/lib/jsdoc/doclet.js @@ -1,9 +1,3 @@ -/** - * @overview - * @author Michael Mathews - * @license Apache License 2.0 - See file 'LICENSE.md' in this project. - */ - /** * @module jsdoc/doclet */ diff --git a/lib/jsdoc/name.js b/lib/jsdoc/name.js index 721a5bae..fbe2c20b 100644 --- a/lib/jsdoc/name.js +++ b/lib/jsdoc/name.js @@ -1,8 +1,6 @@ /** - A collection of functions relating to JSDoc symbol name manipulation. - @module jsdoc/name - @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. + * A collection of functions relating to JSDoc symbol name manipulation. + * @module jsdoc/name */ 'use strict'; @@ -84,8 +82,8 @@ function prototypeToPunc(name) { // TODO: deprecate exports.resolve in favor of a better name /** - Resolves the longname, memberof, variation and name values of the given doclet. - @param {module:jsdoc/doclet.Doclet} doclet + * Resolves the longname, memberof, variation and name values of the given doclet. + * @param {module:jsdoc/doclet.Doclet} doclet */ exports.resolve = function(doclet) { 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} ns The namespace to be applied. - @returns {string} The longname with the namespace applied. + * @param {string} longname The full longname of the symbol. + * @param {string} ns The namespace to be applied. + * @returns {string} The longname with the namespace applied. */ exports.applyNamespace = function(longname, ns) { var nameParts = exports.shorten(longname); @@ -331,11 +328,11 @@ function atomize(longname, sliceChars, forcedMemberof) { // TODO: deprecate exports.shorten in favor of a better name /** - Given a longname like "a.b#c(2)", slice it up into an object - containing the memberof, the scope, the name, and variation. - @param {string} longname - @param {string} forcedMemberof - @returns {object} Representing the properties of the given name. + * Given a longname like "a.b#c(2)", slice it up into an object containing the memberof, the scope, + * the name, and variation. + * @param {string} longname + * @param {string} forcedMemberof + * @returns {object} Representing the properties of the given name. */ exports.shorten = function(longname, 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. - Allows the defaultvalue (if present) to contain brackets. If the name is found to have - mismatched brackets, null is returned. - @param {string} nameDesc - @returns {object} Hash with "name" and "description" properties. + * Split a string that starts with a name and ends with a description into its parts. Allows the + * defaultvalue (if present) to contain brackets. If the name is found to have mismatched brackets, + * null is returned. + * @param {string} nameDesc + * @returns {object} Hash with "name" and "description" properties. */ function splitNameMatchingBrackets(nameDesc) { var buffer = []; @@ -476,9 +473,9 @@ function splitNameMatchingBrackets(nameDesc) { // 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. - @param {string} nameDesc - @returns {object} Hash with "name" and "description" properties. + * Split a string that starts with a name and ends with a description into its parts. + * @param {string} nameDesc + * @returns {object} Hash with "name" and "description" properties. */ exports.splitName = function(nameDesc) { // like: name, [name], name text, [name] text, name - text, or [name] - text diff --git a/lib/jsdoc/opts/argparser.js b/lib/jsdoc/opts/argparser.js index bcfa9b5e..89cb4b83 100644 --- a/lib/jsdoc/opts/argparser.js +++ b/lib/jsdoc/opts/argparser.js @@ -1,8 +1,6 @@ /** * Parse the command line arguments. * @module jsdoc/opts/argparser - * @author Michael Mathews - * @license Apache License 2.0 - See file 'LICENSE.md' in this project. */ 'use strict'; diff --git a/lib/jsdoc/opts/args.js b/lib/jsdoc/opts/args.js index a8317eb6..231418d2 100644 --- a/lib/jsdoc/opts/args.js +++ b/lib/jsdoc/opts/args.js @@ -1,8 +1,6 @@ /** * @module jsdoc/opts/args * @requires jsdoc/opts/argparser - * @author Michael Mathews - * @license Apache License 2.0 - See file 'LICENSE.md' in this project. */ 'use strict'; diff --git a/lib/jsdoc/readme.js b/lib/jsdoc/readme.js index f70d9bee..426df0b2 100644 --- a/lib/jsdoc/readme.js +++ b/lib/jsdoc/readme.js @@ -1,8 +1,6 @@ /** * Make the contents of a README file available to include in the output. * @module jsdoc/readme - * @author Michael Mathews - * @author Ben Blank */ 'use strict'; diff --git a/lib/jsdoc/schema.js b/lib/jsdoc/schema.js index c0241f84..a35e8385 100644 --- a/lib/jsdoc/schema.js +++ b/lib/jsdoc/schema.js @@ -1,9 +1,6 @@ /** - * @overview Schema for validating JSDoc doclets. - * - * @author Michael Mathews - * @author Jeff Williams - * @license Apache License 2.0 - See file 'LICENSE.md' in this project. + * Schema for validating JSDoc doclets. + * @module jsdoc/schema * @see */ 'use strict'; diff --git a/lib/jsdoc/src/filter.js b/lib/jsdoc/src/filter.js index fbd5c8f2..809dac00 100644 --- a/lib/jsdoc/src/filter.js +++ b/lib/jsdoc/src/filter.js @@ -1,8 +1,5 @@ /** - @module jsdoc/src/filter - - @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. + * @module jsdoc/src/filter */ 'use strict'; @@ -20,11 +17,11 @@ function makeRegExp(config) { } /** - @constructor - @param {object} opts - @param {string[]} opts.exclude - Specific files to exclude. - @param {string|RegExp} opts.includePattern - @param {string|RegExp} opts.excludePattern + * @constructor + * @param {Object} opts + * @param {string[]} opts.exclude - Specific files to exclude. + * @param {(string|RegExp)} opts.includePattern + * @param {(string|RegExp)} opts.excludePattern */ exports.Filter = function(opts) { this.exclude = opts.exclude && Array.isArray(opts.exclude) ? @@ -37,8 +34,8 @@ exports.Filter = function(opts) { }; /** - @param {string} filepath - The filepath to check. - @returns {boolean} Should the given file be included? + * @param {string} filepath - The filepath to check. + * @returns {boolean} Should the given file be included? */ exports.Filter.prototype.isIncluded = function(filepath) { var included = true; diff --git a/lib/jsdoc/src/scanner.js b/lib/jsdoc/src/scanner.js index 50a6b1ce..c78ce41a 100644 --- a/lib/jsdoc/src/scanner.js +++ b/lib/jsdoc/src/scanner.js @@ -1,9 +1,6 @@ /** - @module jsdoc/src/scanner - @requires module:fs - - @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. + * @module jsdoc/src/scanner + * @requires module:jsdoc/fs */ 'use strict'; @@ -14,18 +11,18 @@ var path = require('jsdoc/path'); /* eslint-disable no-empty-function */ /** - @constructor - @mixes module:events + * @constructor + * @mixes module:events */ exports.Scanner = function() {}; /* eslint-enable no-empty-function */ exports.Scanner.prototype = Object.create( require('events').EventEmitter.prototype ); /** - Recursively searches the given searchPaths for js files. - @param {Array.} searchPaths - @param {number} [depth=1] - @fires sourceFileFound + * Recursively searches the given searchPaths for js files. + * @param {Array.} searchPaths + * @param {number} [depth=1] + * @fires sourceFileFound */ exports.Scanner.prototype.scan = function(searchPaths, depth, filter) { var currentFile; diff --git a/lib/jsdoc/tag.js b/lib/jsdoc/tag.js index 190d8575..3fcc9368 100644 --- a/lib/jsdoc/tag.js +++ b/lib/jsdoc/tag.js @@ -1,15 +1,13 @@ /** - @overview - @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. - */ - -/** - Functionality related to JSDoc tags. - @module jsdoc/tag - @requires jsdoc/tag/dictionary - @requires jsdoc/tag/validator - @requires jsdoc/tag/type + * Functionality related to JSDoc tags. + * @module jsdoc/tag + * @requires module:jsdoc/env + * @requires module:jsdoc/path + * @requires module:jsdoc/tag/dictionary + * @requires module:jsdoc/tag/validator + * @requires module:jsdoc/tag/type + * @requires module:jsdoc/util/logger + * @requires module:util */ 'use strict'; diff --git a/lib/jsdoc/tag/dictionary/definitions.js b/lib/jsdoc/tag/dictionary/definitions.js index 9205cd25..4103fb6f 100644 --- a/lib/jsdoc/tag/dictionary/definitions.js +++ b/lib/jsdoc/tag/dictionary/definitions.js @@ -1,9 +1,6 @@ /** - Define tags that are known in JSDoc. - @module jsdoc/tag/dictionary/definitions - - @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. + * Define tags that are known in JSDoc. + * @module jsdoc/tag/dictionary/definitions */ 'use strict'; diff --git a/lib/jsdoc/tag/inline.js b/lib/jsdoc/tag/inline.js index bbec313b..333fb355 100644 --- a/lib/jsdoc/tag/inline.js +++ b/lib/jsdoc/tag/inline.js @@ -1,8 +1,5 @@ /** * @module jsdoc/tag/inline - * - * @author Jeff Williams - * @license Apache License 2.0 - See file 'LICENSE.md' in this project. */ 'use strict'; diff --git a/lib/jsdoc/tag/type.js b/lib/jsdoc/tag/type.js index 8e2b18aa..dfec3584 100644 --- a/lib/jsdoc/tag/type.js +++ b/lib/jsdoc/tag/type.js @@ -1,9 +1,5 @@ /** * @module jsdoc/tag/type - * - * @author Michael Mathews - * @author Jeff Williams - * @license Apache License 2.0 - See file 'LICENSE.md' in this project. */ 'use strict'; diff --git a/lib/jsdoc/tag/validator.js b/lib/jsdoc/tag/validator.js index 5cf8eee4..f54ba95c 100644 --- a/lib/jsdoc/tag/validator.js +++ b/lib/jsdoc/tag/validator.js @@ -1,9 +1,6 @@ /** - @module jsdoc/tag/validator - @requires jsdoc/tag/dictionary - - @author Michael Mathews - @license Apache License 2.0 - See file 'LICENSE.md' in this project. + * @module jsdoc/tag/validator + * @requires jsdoc/tag/dictionary */ 'use strict'; diff --git a/lib/jsdoc/template.js b/lib/jsdoc/template.js index dc56b6d9..460be173 100644 --- a/lib/jsdoc/template.js +++ b/lib/jsdoc/template.js @@ -1,8 +1,6 @@ /** - * @file Wrapper for underscore's template utility to allow loading templates from files. - * @author Rafał Wrzeszcz - * @author Matthew Christopher Kastor-Inare III - * @license Apache License 2.0 - See file 'LICENSE.md' in this project. + * Wrapper for underscore's template utility to allow loading templates from files. + * @module jsdoc/template */ 'use strict'; @@ -11,13 +9,9 @@ var _ = require('underscore'), 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) { this.path = filepath; @@ -31,22 +25,23 @@ exports.Template = function(filepath) { }; }; -/** Loads template from given file. - @param {string} file - Template filename. - @return {function} Returns template closure. +/** + * Loads template from given file. + * @param {string} file - Template filename. + * @return {function} Returns template closure. */ exports.Template.prototype.load = function(file) { return _.template(fs.readFileSync(file, 'utf8'), null, this.settings); }; /** - Renders template using given data. - - This is low-level function, for rendering full templates use {@link Template.render()}. - - @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). - @return {string} Rendered template. + * Renders template using given data. + * + * This is low-level function, for rendering full templates use {@link Template.render()}. + * + * @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). + * @return {string} Rendered template. */ exports.Template.prototype.partial = function(file, data) { file = path.resolve(this.path, file); @@ -61,13 +56,13 @@ exports.Template.prototype.partial = function(file, data) { }; /** - Renders template with given data. - - This method automaticaly applies layout if set. - - @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). - @return {string} Rendered template. + * Renders template with given data. + * + * This method automaticaly applies layout if set. + * + * @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). + * @return {string} Rendered template. */ exports.Template.prototype.render = function(file, data) { // main content diff --git a/lib/jsdoc/tutorial.js b/lib/jsdoc/tutorial.js index f536a7e0..f3ecf47d 100644 --- a/lib/jsdoc/tutorial.js +++ b/lib/jsdoc/tutorial.js @@ -1,7 +1,5 @@ /** - @overview - @author Rafał Wrzeszcz - @license Apache License 2.0 - See file 'LICENSE.md' in this project. + * @module jsdoc/tutorial */ 'use strict'; @@ -10,10 +8,12 @@ var util = require('util'); var hasOwnProp = Object.prototype.hasOwnProperty; -/** Removes child tutorial from the parent. Does *not* unset child.parent though. - @param {Tutorial} parent - parent tutorial. - @param {Tutorial} child - Old child. - @private +/** + * Removes child tutorial from the parent. Does *not* unset child.parent though. + * + * @param {Tutorial} parent - parent tutorial. + * @param {Tutorial} child - Old child. + * @private */ function removeChild(parent, 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. - @param {Tutorial} child - New child. - @private +/** + * Adds a child to the parent tutorial. Does *not* set child.parent though. + * + * @param {Tutorial} parent - parent tutorial. + * @param {Tutorial} child - New child. + * @private */ function addChild(parent, 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. - @param {number} type - Source formating. + * @class + * @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) { this.title = this.name = this.longname = name; @@ -53,8 +51,10 @@ exports.Tutorial = function(name, content, type) { 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) { // 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) { 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) { child.setParent(this); }; -/** Prepares source. - @return {string} HTML source. +/** + * Prepares source. + * + * @return {string} HTML source. */ exports.Tutorial.prototype.parse = function() { switch (this.type) { @@ -133,8 +139,10 @@ exports.RootTutorial.prototype._addTutorial = function(child) { this._tutorials[child.name] = child; }; -/** Tutorial source types. - @enum {number} +/** + * Tutorial source types. + * + * @enum {number} */ exports.TYPES = { HTML: 1, diff --git a/lib/jsdoc/tutorial/resolver.js b/lib/jsdoc/tutorial/resolver.js index 33cb4fa9..987843d4 100644 --- a/lib/jsdoc/tutorial/resolver.js +++ b/lib/jsdoc/tutorial/resolver.js @@ -1,11 +1,5 @@ /** - @overview - @author Rafał Wrzeszcz - @license Apache License 2.0 - See file 'LICENSE.md' in this project. - */ - -/** - @module jsdoc/tutorial/resolver + * @module jsdoc/tutorial/resolver */ 'use strict'; @@ -38,22 +32,20 @@ function isTutorialJSON(json) { */ 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, - * or when a tutorial's children are specified as tutorial configurations as - * opposed to an array of tutorial names. +/** + * Helper function that adds tutorial configuration to the `conf` variable. This helps when multiple + * tutorial configurations are specified in one object, or when a tutorial's children are specified + * as tutorial configurations as opposed to an array of tutorial names. * * Recurses as necessary to ensure all tutorials are added. * - * @param {string} name - if `meta` is a configuration for a single tutorial, - * this is that tutorial's name. - * @param {object} meta - object that contains tutorial information. - * Can either be for a single tutorial, or for multiple - * (where each key in `meta` is the tutorial name and each - * value is the information for a single tutorial). - * Additionally, a tutorial's 'children' property may - * either be an array of strings (names of the child tutorials), - * OR an object giving the configuration for the child tutorials. + * @param {string} name - if `meta` is a configuration for a single tutorial, this is that + * tutorial's name. + * @param {object} meta - object that contains tutorial information. Can either be for a single + * tutorial, or for multiple (where each key in `meta` is the tutorial name and each value is the + * information for a single tutorial). Additionally, a tutorial's 'children' property may 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) { var i; @@ -158,7 +150,8 @@ exports.load = function(filepath) { }); }; -/** Resolves hierarchical structure. +/** + * Resolves hierarchical structure. */ exports.resolve = function() { var item; diff --git a/lib/jsdoc/util/dumper.js b/lib/jsdoc/util/dumper.js index 38fb5f05..ad2cf559 100644 --- a/lib/jsdoc/util/dumper.js +++ b/lib/jsdoc/util/dumper.js @@ -2,8 +2,6 @@ /** * Recursively print out all names and values in a data structure. * @module jsdoc/util/dumper - * @author Michael Mathews - * @license Apache License 2.0 - See file 'LICENSE.md' in this project. */ 'use strict'; diff --git a/lib/jsdoc/util/markdown.js b/lib/jsdoc/util/markdown.js index 319ffcfc..b780cc06 100644 --- a/lib/jsdoc/util/markdown.js +++ b/lib/jsdoc/util/markdown.js @@ -1,8 +1,6 @@ /** * Provides access to Markdown-related functions. * @module jsdoc/util/markdown - * @author Michael Mathews - * @author Ben Blank */ 'use strict'; diff --git a/plugins/commentConvert.js b/plugins/commentConvert.js index 3b6ffc1f..14a9e6a7 100644 --- a/plugins/commentConvert.js +++ b/plugins/commentConvert.js @@ -1,8 +1,8 @@ /* eslint-disable spaced-comment */ /** - @overview Demonstrate how to modify the source code before the parser sees it. - @module plugins/commentConvert - @author Michael Mathews + * Demonstrate how to modify the source code before the parser sees it. + * + * @module plugins/commentConvert */ 'use strict'; diff --git a/plugins/commentsOnly.js b/plugins/commentsOnly.js index fc85f433..00f94921 100644 --- a/plugins/commentsOnly.js +++ b/plugins/commentsOnly.js @@ -1,9 +1,7 @@ /** - * @overview Remove everything in a file except JSDoc-style comments. By enabling this plugin, you - * can document source files that are not valid JavaScript (including source files for other - * languages). + * Remove everything in a file except JSDoc-style comments. By enabling this plugin, you can + * document source files that are not valid JavaScript (including source files for other languages). * @module plugins/commentsOnly - * @author Jeff Williams */ 'use strict'; diff --git a/plugins/escapeHtml.js b/plugins/escapeHtml.js index 6098e4c8..b7efa9ba 100644 --- a/plugins/escapeHtml.js +++ b/plugins/escapeHtml.js @@ -1,14 +1,13 @@ /** - @overview Escape HTML tags in descriptions. - @module plugins/escapeHtml - @author Michael Mathews + * Escape HTML tags in descriptions. + * + * @module plugins/escapeHtml */ 'use strict'; exports.handlers = { /** - Translate HTML tags in descriptions into safe entities. - Replaces <, & and newlines + * Translate HTML tags in descriptions into safe entities. Replaces <, & and newlines */ newDoclet: function(e) { if (e.doclet.description) { diff --git a/plugins/eventDumper.js b/plugins/eventDumper.js index 8b205041..7ef5e6e6 100644 --- a/plugins/eventDumper.js +++ b/plugins/eventDumper.js @@ -1,7 +1,7 @@ /** - * @overview Dump information about parser events to the console. + * Dump information about parser events to the console. + * * @module plugins/eventDumper - * @author Jeff Williams */ 'use strict'; diff --git a/plugins/markdown.js b/plugins/markdown.js index 2970377f..8f5cd043 100644 --- a/plugins/markdown.js +++ b/plugins/markdown.js @@ -1,8 +1,7 @@ /** - * @overview Translate doclet descriptions from MarkDown into HTML. + * Translate doclet descriptions from Markdown into HTML. + * * @module plugins/markdown - * @author Michael Mathews - * @author Ben Blank */ 'use strict'; @@ -36,10 +35,10 @@ function shouldProcessString(tagName, text) { } /** - * Process the markdown source in a doclet. The properties that should be - * processed are configurable, but always include "classdesc", "description", - * "params", "properties", and "returns". Handled properties can be bare - * strings, objects, or arrays of objects. + * Process the markdown source in a doclet. The properties that should be processed are + * configurable, but always include "author", "classdesc", "description", "exceptions", "params", + * "properties", "returns", and "see". Handled properties can be bare strings, objects, or arrays + * of objects. */ function process(doclet) { tags.forEach(function(tag) { @@ -81,7 +80,7 @@ defaultTags.forEach(function(tag) { 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. */ newDoclet: function(e) { diff --git a/plugins/overloadHelper.js b/plugins/overloadHelper.js index f2e6f7e5..52f8b6ec 100644 --- a/plugins/overloadHelper.js +++ b/plugins/overloadHelper.js @@ -33,8 +33,6 @@ * will assign numeric variations instead, starting at `(1)` and counting upwards. * * @module plugins/overloadHelper - * @author Jeff Williams - * @license Apache License 2.0 */ 'use strict'; diff --git a/plugins/partial.js b/plugins/partial.js index dce7d8b3..728c4029 100644 --- a/plugins/partial.js +++ b/plugins/partial.js @@ -1,7 +1,7 @@ /** - @overview Adds support for reusable partial jsdoc files. - @module plugins/partial - @author Ludo Antonov + * Adds support for reusable partial jsdoc files. + * + * @module plugins/partial */ 'use strict'; diff --git a/plugins/railsTemplate.js b/plugins/railsTemplate.js index 270381c6..31213ec7 100644 --- a/plugins/railsTemplate.js +++ b/plugins/railsTemplate.js @@ -1,13 +1,14 @@ /** - @overview Strips the rails template tags from a js.erb file - @module plugins/railsTemplate - @author Jannon Frank + * Strips the rails template tags from a js.erb file + * + * @module plugins/railsTemplate */ 'use strict'; exports.handlers = { /** * Remove rails tags from the source input (e.g. <% foo bar %>) + * * @param e * @param e.filename * @param e.source diff --git a/plugins/shout.js b/plugins/shout.js index 05c5d9f8..bf2f00e8 100644 --- a/plugins/shout.js +++ b/plugins/shout.js @@ -1,13 +1,13 @@ /** - @overview This is just an example. - @module plugins/shout - @author Michael Mathews + * This is just an example. + * + * @module plugins/shout */ 'use strict'; exports.handlers = { /** - Make your descriptions more shoutier. + * Make your descriptions more shoutier. */ newDoclet: function(e) { if (typeof e.doclet.description === 'string') { diff --git a/plugins/sourcetag.js b/plugins/sourcetag.js index 444b04e4..c31df7bd 100644 --- a/plugins/sourcetag.js +++ b/plugins/sourcetag.js @@ -1,6 +1,5 @@ /** - @module plugins/sourcetag - @author Michael Mathews + * @module plugins/sourcetag */ 'use strict'; @@ -8,15 +7,17 @@ var logger = require('jsdoc/util/logger'); exports.handlers = { /** - Support @source tag. Expected value like: - { "filename": "myfile.js", "lineno": 123 } - Modifies the corresponding meta values on the given doclet. - - 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, - update your template settings to disable pretty-printed source files. - - @source { "filename": "sourcetag.js", "lineno": 13 } + * Support @source tag. Expected value like: + * + * { "filename": "myfile.js", "lineno": 123 } + * + * Modifies the corresponding meta values on the given doclet. + * + * 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, + * update your template settings to disable pretty-printed source files. + * + * @source { "filename": "sourcetag.js", "lineno": 9 } */ newDoclet: function(e) { var tags = e.doclet.tags; diff --git a/plugins/summarize.js b/plugins/summarize.js index da72f738..51cb2142 100644 --- a/plugins/summarize.js +++ b/plugins/summarize.js @@ -1,8 +1,7 @@ /** - * @overview This plugin creates a summary tag, if missing, from the first sentence in the - * description. + * This plugin creates a summary tag, if missing, from the first sentence in the description. + * * @module plugins/summarize - * @author Mads Bondo Dydensborg */ 'use strict'; diff --git a/plugins/test/fixtures/railsTemplate.js.erb b/plugins/test/fixtures/railsTemplate.js.erb index c3df6495..53dfff72 100644 --- a/plugins/test/fixtures/railsTemplate.js.erb +++ b/plugins/test/fixtures/railsTemplate.js.erb @@ -1,7 +1,7 @@ /** - @overview Strips the rails template tags from a js.erb file - @module plugins/railsTemplate - @author Jannon Frank + * Strips the rails template tags from a js.erb file + * + * @module plugins/railsTemplate */ exports.handlers = { @@ -16,4 +16,4 @@ exports.handlers = { e.source = e.source.replace(/<%.*%> /g, ""); } } -}; \ No newline at end of file +}; diff --git a/plugins/test/specs/escapeHtml.js b/plugins/test/specs/escapeHtml.js index 2f4b1873..d7497964 100644 --- a/plugins/test/specs/escapeHtml.js +++ b/plugins/test/specs/escapeHtml.js @@ -8,13 +8,13 @@ describe('escapeHtml plugin', function() { var parser = jasmine.createParser(); var pluginPath = 'plugins/escapeHtml'; var pluginPathResolved = path.join(env.dirname, pluginPath); - var plugin = require(pluginPathResolved); require('jsdoc/plugins').installPlugins([pluginPathResolved], parser); docSet = jasmine.getDocSetFromFile(pluginPath + '.js', parser); it("should escape '&', '<' and newlines in doclet descriptions", function() { var doclet = docSet.getByLongname('module:plugins/escapeHtml.handlers.newDoclet'); - expect(doclet[0].description).toEqual('Translate HTML tags in descriptions into safe entities.
Replaces <, & and newlines'); + + expect(doclet[0].description).toEqual('Translate HTML tags in descriptions into safe entities. Replaces <, & and newlines'); }); }); diff --git a/plugins/test/specs/sourcetag.js b/plugins/test/specs/sourcetag.js index 20039cd7..d0948a27 100644 --- a/plugins/test/specs/sourcetag.js +++ b/plugins/test/specs/sourcetag.js @@ -8,15 +8,15 @@ describe('sourcetag plugin', function() { var parser = jasmine.createParser(); var pluginPath = 'plugins/sourcetag'; var pluginPathResolved = path.join(env.dirname, pluginPath); - var plugin = require(pluginPathResolved); require('jsdoc/plugins').installPlugins([pluginPathResolved], parser); docSet = jasmine.getDocSetFromFile(pluginPath + '.js', parser); it("should set the lineno and filename of the doclet's meta property", function() { var doclet = docSet.getByLongname('module:plugins/sourcetag.handlers.newDoclet'); + expect(doclet[0].meta).toBeDefined(); expect(doclet[0].meta.filename).toEqual('sourcetag.js'); - expect(doclet[0].meta.lineno).toEqual(13); + expect(doclet[0].meta.lineno).toEqual(9); }); }); diff --git a/plugins/underscore.js b/plugins/underscore.js index e5cf1120..44205283 100644 --- a/plugins/underscore.js +++ b/plugins/underscore.js @@ -6,7 +6,6 @@ * automatically hides them. * * @module plugins/underscore - * @author Daniel Ellis */ exports.handlers = {