mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
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:
parent
a097e2f299
commit
8b26b6d669
5
jsdoc.js
5
jsdoc.js
@ -1,11 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
/* global require: true */
|
||||
/* 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
|
||||
(function() {
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
/**
|
||||
A collection of functions relating to resolving @borrows tags in JSDoc symbols.
|
||||
@module jsdoc/borrow
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@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';
|
||||
|
||||
|
||||
@ -1,11 +1,5 @@
|
||||
/**
|
||||
@overview
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@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;
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
/**
|
||||
A collection of functions relating to JSDoc symbol name manipulation.
|
||||
@module jsdoc/name
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@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
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
/**
|
||||
* Parse the command line arguments.
|
||||
* @module jsdoc/opts/argparser
|
||||
* @author Michael Mathews <micmath@gmail.com>
|
||||
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
/**
|
||||
* @module jsdoc/opts/args
|
||||
* @requires jsdoc/opts/argparser
|
||||
* @author Michael Mathews <micmath@gmail.com>
|
||||
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
/**
|
||||
* Make the contents of a README file available to include in the output.
|
||||
* @module jsdoc/readme
|
||||
* @author Michael Mathews <micmath@gmail.com>
|
||||
* @author Ben Blank <ben.blank@gmail.com>
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
/**
|
||||
* @overview Schema for validating JSDoc doclets.
|
||||
*
|
||||
* @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.
|
||||
* Schema for validating JSDoc doclets.
|
||||
* @module jsdoc/schema
|
||||
* @see <http://tools.ietf.org/html/draft-zyp-json-schema-03>
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
/**
|
||||
@module jsdoc/src/filter
|
||||
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@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;
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
/**
|
||||
@module jsdoc/src/scanner
|
||||
@requires module:fs
|
||||
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@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.<string>} searchPaths
|
||||
@param {number} [depth=1]
|
||||
@fires sourceFileFound
|
||||
* Recursively searches the given searchPaths for js files.
|
||||
* @param {Array.<string>} searchPaths
|
||||
* @param {number} [depth=1]
|
||||
* @fires sourceFileFound
|
||||
*/
|
||||
exports.Scanner.prototype.scan = function(searchPaths, depth, filter) {
|
||||
var currentFile;
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
/**
|
||||
@overview
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@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';
|
||||
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
/**
|
||||
Define tags that are known in JSDoc.
|
||||
@module jsdoc/tag/dictionary/definitions
|
||||
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@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';
|
||||
|
||||
|
||||
@ -1,8 +1,5 @@
|
||||
/**
|
||||
* @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';
|
||||
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
/**
|
||||
* @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';
|
||||
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
/**
|
||||
@module jsdoc/tag/validator
|
||||
@requires jsdoc/tag/dictionary
|
||||
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
@license Apache License 2.0 - See file 'LICENSE.md' in this project.
|
||||
* @module jsdoc/tag/validator
|
||||
* @requires jsdoc/tag/dictionary
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
/**
|
||||
* @file Wrapper for underscore's template utility to allow loading templates from files.
|
||||
* @author Rafał Wrzeszcz <rafal.wrzeszcz@wrzasq.pl>
|
||||
* @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.
|
||||
* 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
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
/**
|
||||
@overview
|
||||
@author Rafał Wrzeszcz <rafal.wrzeszcz@wrzasq.pl>
|
||||
@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,
|
||||
|
||||
@ -1,11 +1,5 @@
|
||||
/**
|
||||
@overview
|
||||
@author Rafał Wrzeszcz <rafal.wrzeszcz@wrzasq.pl>
|
||||
@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;
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
/**
|
||||
* Recursively print out all names and values in a data structure.
|
||||
* @module jsdoc/util/dumper
|
||||
* @author Michael Mathews <micmath@gmail.com>
|
||||
* @license Apache License 2.0 - See file 'LICENSE.md' in this project.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
/**
|
||||
* Provides access to Markdown-related functions.
|
||||
* @module jsdoc/util/markdown
|
||||
* @author Michael Mathews <micmath@gmail.com>
|
||||
* @author Ben Blank <ben.blank@gmail.com>
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -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 <micmath@gmail.com>
|
||||
* Demonstrate how to modify the source code before the parser sees it.
|
||||
*
|
||||
* @module plugins/commentConvert
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -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 <jeffrey.l.williams@gmail.com>
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
/**
|
||||
@overview Escape HTML tags in descriptions.
|
||||
@module plugins/escapeHtml
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
* 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) {
|
||||
|
||||
@ -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 <jeffrey.l.williams@gmail.com>
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -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 <micmath@gmail.com>
|
||||
* @author Ben Blank <ben.blank@gmail.com>
|
||||
*/
|
||||
'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) {
|
||||
|
||||
@ -33,8 +33,6 @@
|
||||
* will assign numeric variations instead, starting at `(1)` and counting upwards.
|
||||
*
|
||||
* @module plugins/overloadHelper
|
||||
* @author Jeff Williams <jeffrey.l.williams@gmail.com>
|
||||
* @license Apache License 2.0
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/**
|
||||
@overview Adds support for reusable partial jsdoc files.
|
||||
@module plugins/partial
|
||||
@author Ludo Antonov <ludo@hulu.com>
|
||||
* Adds support for reusable partial jsdoc files.
|
||||
*
|
||||
* @module plugins/partial
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
/**
|
||||
@overview Strips the rails template tags from a js.erb file
|
||||
@module plugins/railsTemplate
|
||||
@author Jannon Frank <jannon@jannon.net>
|
||||
* 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
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
/**
|
||||
@overview This is just an example.
|
||||
@module plugins/shout
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
* 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') {
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
/**
|
||||
@module plugins/sourcetag
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
* @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;
|
||||
|
||||
@ -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 <mbd@dbc.dk>
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
|
||||
6
plugins/test/fixtures/railsTemplate.js.erb
vendored
6
plugins/test/fixtures/railsTemplate.js.erb
vendored
@ -1,7 +1,7 @@
|
||||
/**
|
||||
@overview Strips the rails template tags from a js.erb file
|
||||
@module plugins/railsTemplate
|
||||
@author Jannon Frank <jannon@jannon.net>
|
||||
* Strips the rails template tags from a js.erb file
|
||||
*
|
||||
* @module plugins/railsTemplate
|
||||
*/
|
||||
|
||||
exports.handlers = {
|
||||
|
||||
@ -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.<br> Replaces <, & and newlines');
|
||||
|
||||
expect(doclet[0].description).toEqual('Translate HTML tags in descriptions into safe entities. Replaces <, & and newlines');
|
||||
});
|
||||
});
|
||||
|
||||
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
* automatically hides them.
|
||||
*
|
||||
* @module plugins/underscore
|
||||
* @author Daniel Ellis <coug36@gmail.com>
|
||||
*/
|
||||
|
||||
exports.handlers = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user