mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
checking in jsdoc dir so people can generate docs themselves
This commit is contained in:
45
jsdoc-master/test/README.md
Normal file
45
jsdoc-master/test/README.md
Normal file
@@ -0,0 +1,45 @@
|
||||
Testing JSDoc 3
|
||||
===============
|
||||
|
||||
Running Tests
|
||||
-------------
|
||||
|
||||
Running tests is easy. Just change your working directory to the jsdoc folder
|
||||
and run the following command on Windows:
|
||||
|
||||
jsdoc -T
|
||||
|
||||
Or on OS X, Linux, and other POSIX-compliant platforms:
|
||||
|
||||
./jsdoc -T
|
||||
|
||||
If you can't get the short-form commands to work, try invoking Java directly:
|
||||
|
||||
java -cp lib/js.jar org.mozilla.javascript.tools.shell.Main \
|
||||
-modules node_modules -modules rhino -modules lib -modules . \
|
||||
jsdoc.js -T
|
||||
|
||||
Writing Tests
|
||||
-------------
|
||||
|
||||
Adding tests is pretty easy, too. You can write tests for JSDoc itself (to
|
||||
make sure tags and the parser, etc. are working properly), tests for plugins, and/or
|
||||
tests for templates.
|
||||
|
||||
JSDoc 3 uses Jasmine (https://github.com/pivotal/jasmine) as its testing framework.
|
||||
Take a look at that project's wiki for documentation on writing tests in general.
|
||||
|
||||
### Tests for JSDoc
|
||||
|
||||
Take a look at the files in the ```test``` directory for many examples of
|
||||
writing tests for JSDoc itself. The ```test\fixtures``` directory hold fixtures
|
||||
for use in the tests, and the ```test\specs``` directory holds the tests themselves.
|
||||
|
||||
### Tests for plugins
|
||||
|
||||
Tests for plugins are found in the ```plugins\test``` directory. Plugins containing
|
||||
tests that were installed with the Jakefile install task will be run automatically.
|
||||
|
||||
### Tests for templates
|
||||
|
||||
TODO
|
57
jsdoc-master/test/async-callback.js
Normal file
57
jsdoc-master/test/async-callback.js
Normal file
@@ -0,0 +1,57 @@
|
||||
/*global jasmine: true */
|
||||
(function() {
|
||||
var withoutAsync = {};
|
||||
|
||||
["it", "beforeEach", "afterEach"].forEach(function(jasmineFunction) {
|
||||
withoutAsync[jasmineFunction] = jasmine.Env.prototype[jasmineFunction];
|
||||
return jasmine.Env.prototype[jasmineFunction] = function() {
|
||||
var args = Array.prototype.slice.call(arguments, 0);
|
||||
var timeout = null;
|
||||
if (isLastArgumentATimeout(args)) {
|
||||
timeout = args.pop();
|
||||
}
|
||||
if (isLastArgumentAnAsyncSpecFunction(args))
|
||||
{
|
||||
var specFunction = args.pop();
|
||||
args.push(function() {
|
||||
return asyncSpec(specFunction, this, timeout);
|
||||
});
|
||||
}
|
||||
return withoutAsync[jasmineFunction].apply(this, args);
|
||||
};
|
||||
});
|
||||
|
||||
function isLastArgumentATimeout(args)
|
||||
{
|
||||
return args.length > 0 && (typeof args[args.length-1]) === "number";
|
||||
}
|
||||
|
||||
function isLastArgumentAnAsyncSpecFunction(args)
|
||||
{
|
||||
return args.length > 0 && (typeof args[args.length-1]) === "function" && args[args.length-1].length > 0;
|
||||
}
|
||||
|
||||
function asyncSpec(specFunction, spec, timeout) {
|
||||
if (timeout == null){timeout = jasmine.DEFAULT_TIMEOUT_INTERVAL || 1000;}
|
||||
var done = false;
|
||||
spec.runs(function() {
|
||||
try {
|
||||
return specFunction(function(error) {
|
||||
done = true;
|
||||
if (error != null) {
|
||||
return spec.fail(error);
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
done = true;
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
return spec.waitsFor(function() {
|
||||
if (done === true) {
|
||||
return true;
|
||||
}
|
||||
}, "spec to complete", timeout);
|
||||
}
|
||||
|
||||
}).call(this);
|
17
jsdoc-master/test/fixtures/abstracttag.js
vendored
Normal file
17
jsdoc-master/test/fixtures/abstracttag.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/** @constructor */
|
||||
function Thingy() {
|
||||
|
||||
/** @abstract */
|
||||
this.pez = 2;
|
||||
|
||||
}
|
||||
|
||||
// same as...
|
||||
|
||||
/** @constructor */
|
||||
function OtherThingy() {
|
||||
|
||||
/** @virtual */
|
||||
this.pez = 2;
|
||||
|
||||
}
|
29
jsdoc-master/test/fixtures/accesstag.js
vendored
Normal file
29
jsdoc-master/test/fixtures/accesstag.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/** @constructor */
|
||||
function Thingy() {
|
||||
|
||||
/** @access private */
|
||||
var foo = 0;
|
||||
|
||||
/** @access protected */
|
||||
this._bar = 1;
|
||||
|
||||
/** @access public */
|
||||
this.pez = 2;
|
||||
|
||||
}
|
||||
|
||||
// same as...
|
||||
|
||||
/** @constructor */
|
||||
function OtherThingy() {
|
||||
|
||||
/** @private */
|
||||
var foo = 0;
|
||||
|
||||
/** @protected */
|
||||
this._bar = 1;
|
||||
|
||||
/** @public */
|
||||
this.pez = 2;
|
||||
|
||||
}
|
13
jsdoc-master/test/fixtures/alias.js
vendored
Normal file
13
jsdoc-master/test/fixtures/alias.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
var myObject = (function() {
|
||||
|
||||
/** Give x another name.
|
||||
@alias myObject
|
||||
@namespace
|
||||
*/
|
||||
var x = {
|
||||
/** document me */
|
||||
myProperty: 'foo'
|
||||
}
|
||||
|
||||
return x;
|
||||
})();
|
10
jsdoc-master/test/fixtures/alias2.js
vendored
Normal file
10
jsdoc-master/test/fixtures/alias2.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
(function() {
|
||||
|
||||
/** @alias ns.Myclass# */
|
||||
var x = {
|
||||
/** document me */
|
||||
myProperty: 'foo'
|
||||
}
|
||||
|
||||
return x;
|
||||
})();
|
12
jsdoc-master/test/fixtures/alias3.js
vendored
Normal file
12
jsdoc-master/test/fixtures/alias3.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Klass('trackr.CookieManager',
|
||||
|
||||
/** @class
|
||||
@alias trackr.CookieManager
|
||||
@param {object} kv
|
||||
*/
|
||||
function(kv) {
|
||||
/** document me */
|
||||
this.value = kv;
|
||||
}
|
||||
|
||||
);
|
7
jsdoc-master/test/fixtures/aliasglobal.js
vendored
Normal file
7
jsdoc-master/test/fixtures/aliasglobal.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
(function() {
|
||||
|
||||
/** @alias <global>.log */
|
||||
var log = function() {
|
||||
}
|
||||
|
||||
})();
|
18
jsdoc-master/test/fixtures/aliasglobal2.js
vendored
Normal file
18
jsdoc-master/test/fixtures/aliasglobal2.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
(function () {
|
||||
/**
|
||||
* Creates a new test object.
|
||||
* @alias Test
|
||||
* @constructor
|
||||
*/
|
||||
var Test = function(testName) {
|
||||
/** Document me. */
|
||||
this.name = testName;
|
||||
}
|
||||
|
||||
/** Document me. */
|
||||
Test.prototype.run = function(message) {
|
||||
};
|
||||
|
||||
/** Document me. */
|
||||
Test.counter = 1;
|
||||
})();
|
19
jsdoc-master/test/fixtures/aliasresolve.js
vendored
Normal file
19
jsdoc-master/test/fixtures/aliasresolve.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @namespace
|
||||
*/
|
||||
var A = {};
|
||||
|
||||
(function(ns) {
|
||||
/**
|
||||
* @namespace
|
||||
* @alias A.F
|
||||
*/
|
||||
var f = {};
|
||||
|
||||
/**
|
||||
* @return {String}
|
||||
*/
|
||||
f.method = function(){};
|
||||
|
||||
ns.F = f;
|
||||
})(A);
|
19
jsdoc-master/test/fixtures/aliasresolve2.js
vendored
Normal file
19
jsdoc-master/test/fixtures/aliasresolve2.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @namespace
|
||||
*/
|
||||
var A = {};
|
||||
|
||||
/**
|
||||
* @namespace
|
||||
* @alias A.F
|
||||
*/
|
||||
var f = {};
|
||||
|
||||
(function(ns) {
|
||||
/**
|
||||
* @return {String}
|
||||
*/
|
||||
f.method = function(){};
|
||||
|
||||
ns.F = f;
|
||||
})(A);
|
46
jsdoc-master/test/fixtures/also.js
vendored
Normal file
46
jsdoc-master/test/fixtures/also.js
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/** @class */
|
||||
function Asset() {
|
||||
this._name = '';
|
||||
this._shape = '';
|
||||
this._shhhhKeepThisSecret = '';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Set the value of the name property.
|
||||
* @param {string} newName
|
||||
*
|
||||
*//**
|
||||
*
|
||||
* Get the value of the name property.
|
||||
* @returns {string}
|
||||
*
|
||||
*/
|
||||
Asset.prototype.name = function(newName) {
|
||||
if (newName) { this._name = newName; }
|
||||
else { return this._name; }
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the value of the shape property.
|
||||
* @param {string} newShape
|
||||
*//**
|
||||
* Set the value of the shape property, plus some other property.
|
||||
* @param {string} newShape
|
||||
* @param {string} mysteryProperty
|
||||
*//**
|
||||
* Get the value of the shape property.
|
||||
* @returns {string}
|
||||
*/
|
||||
Asset.prototype.shape = function(newShape, mysteryProperty) {
|
||||
if (newShape && mysteryProperty) {
|
||||
this._shape = newShape;
|
||||
this._shhhhKeepThisSecret = mysteryProperty;
|
||||
}
|
||||
else if (newShape) {
|
||||
this._shape = newShape;
|
||||
}
|
||||
else {
|
||||
return this._shape;
|
||||
}
|
||||
};
|
53
jsdoc-master/test/fixtures/augmentstag.js
vendored
Normal file
53
jsdoc-master/test/fixtures/augmentstag.js
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function Foo() {
|
||||
/** First property */
|
||||
this.prop1 = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Second property
|
||||
* @type {String}
|
||||
*/
|
||||
Foo.prototype.prop2 = "parent prop2";
|
||||
|
||||
/**
|
||||
* First parent method.
|
||||
*/
|
||||
Foo.prototype.method1 = function() {};
|
||||
|
||||
/**
|
||||
* Second parent method.
|
||||
*/
|
||||
Foo.prototype.method2 = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends Foo
|
||||
*/
|
||||
function Bar() {
|
||||
/** Thrid prop **/
|
||||
this.prop3 = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Second child method.
|
||||
*/
|
||||
Bar.prototype.method2 = function() {};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {Bar}
|
||||
*/
|
||||
function Baz() {
|
||||
/** Override prop1 */
|
||||
this.prop1 = "new";
|
||||
}
|
||||
|
||||
/**
|
||||
* Third grandchild method.
|
||||
*/
|
||||
Baz.prototype.method3 = function() {};
|
||||
|
6
jsdoc-master/test/fixtures/augmentstag2.js
vendored
Normal file
6
jsdoc-master/test/fixtures/augmentstag2.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
// Test for @augments/@extends tags that refer to undefined symbols
|
||||
/**
|
||||
* @constructor
|
||||
* @extends UndocumentedThing
|
||||
*/
|
||||
function Qux() {}
|
18
jsdoc-master/test/fixtures/augmentstag3.js
vendored
Normal file
18
jsdoc-master/test/fixtures/augmentstag3.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
// test to see that we can @augment multiple things (code allows for it)
|
||||
/** @class */
|
||||
function Foo() {
|
||||
}
|
||||
/** A method. */
|
||||
Foo.prototype.method1 = function () {};
|
||||
|
||||
/** @class */
|
||||
function Bar() {
|
||||
}
|
||||
/** Another method. */
|
||||
Bar.prototype.method2 = function () {}
|
||||
|
||||
/** @class
|
||||
* @augments Foo
|
||||
* @augments Bar */
|
||||
function FooBar() {
|
||||
}
|
10
jsdoc-master/test/fixtures/authortag.js
vendored
Normal file
10
jsdoc-master/test/fixtures/authortag.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/** @constructor
|
||||
@author Michael Mathews <micmath@gmail.com>
|
||||
*/
|
||||
function Thingy() {
|
||||
}
|
||||
|
||||
/** @author John Doe <john.doe@gmail.com>
|
||||
* @author Jane Doe <jane.doe@gmail.com> */
|
||||
function Thingy2() {
|
||||
}
|
14
jsdoc-master/test/fixtures/borrowstag.js
vendored
Normal file
14
jsdoc-master/test/fixtures/borrowstag.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/** @namespace
|
||||
@borrows trstr as trim
|
||||
*/
|
||||
var util = {
|
||||
"trim": trstr
|
||||
};
|
||||
|
||||
/**
|
||||
Remove whitespace from around a string.
|
||||
@param {string} str
|
||||
*/
|
||||
function trstr(str) {
|
||||
}
|
||||
|
21
jsdoc-master/test/fixtures/borrowstag2.js
vendored
Normal file
21
jsdoc-master/test/fixtures/borrowstag2.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/** @namespace
|
||||
@borrows rtrim
|
||||
*/
|
||||
var str = {
|
||||
rtrim: util.rtrim
|
||||
};
|
||||
|
||||
/** @namespace
|
||||
@borrows rtrim
|
||||
*/
|
||||
var util = {
|
||||
rtrim: rtrim
|
||||
};
|
||||
|
||||
/**
|
||||
Remove whitespace from the right side of a string.
|
||||
@param {string} str
|
||||
*/
|
||||
function rtrim(str) {
|
||||
}
|
||||
|
21
jsdoc-master/test/fixtures/callbacktag.js
vendored
Normal file
21
jsdoc-master/test/fixtures/callbacktag.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @param {requestResponseCallback} cb
|
||||
*/
|
||||
function makeSpecialRequest(cb) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {wrongTypeCallback} cb
|
||||
*/
|
||||
function makeExtraSpecialRequest(cb) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @callback requestResponseCallback
|
||||
* @param {number} responseCode
|
||||
* @param {string} responseText
|
||||
*/
|
||||
|
||||
/**
|
||||
* @callback {(object|string)} wrongTypeCallback
|
||||
*/
|
7
jsdoc-master/test/fixtures/classdesctag.js
vendored
Normal file
7
jsdoc-master/test/fixtures/classdesctag.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Asdf.
|
||||
* @class
|
||||
* @classdesc A description of the class.
|
||||
*/
|
||||
function Foo () {
|
||||
}
|
12
jsdoc-master/test/fixtures/classtag.js
vendored
Normal file
12
jsdoc-master/test/fixtures/classtag.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
Describe the Ticker class here.
|
||||
@class
|
||||
*/
|
||||
var Ticker = function() {
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
Describe the NewsSource class here.
|
||||
@class NewsSource
|
||||
*/
|
6
jsdoc-master/test/fixtures/constanttag.js
vendored
Normal file
6
jsdoc-master/test/fixtures/constanttag.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/** @constant */
|
||||
var FOO = 1;
|
||||
|
||||
/** @const BAR */
|
||||
|
||||
/** @const {string} BAZ */
|
15
jsdoc-master/test/fixtures/constructortag.js
vendored
Normal file
15
jsdoc-master/test/fixtures/constructortag.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
Describe your constructor function here.
|
||||
@class Describe your class here.
|
||||
@constructor
|
||||
@param {string} url
|
||||
@throws MalformedURL
|
||||
*/
|
||||
function Feed(url) {
|
||||
}
|
||||
|
||||
/**
|
||||
Document your method here.
|
||||
*/
|
||||
Feed.prototype.refresh = function() {
|
||||
}
|
19
jsdoc-master/test/fixtures/constructstag.js
vendored
Normal file
19
jsdoc-master/test/fixtures/constructstag.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Classify('TextBlock', {
|
||||
|
||||
/**
|
||||
Document your constructor function here.
|
||||
@constructs TextBlock
|
||||
@classdesc Describe your class here
|
||||
@param {object} opts
|
||||
@throws MissingNode
|
||||
*/
|
||||
construct: function(node, opts) {
|
||||
},
|
||||
|
||||
/**
|
||||
Document your method here.
|
||||
@memberof TextBlock#
|
||||
*/
|
||||
align: function() {
|
||||
}
|
||||
});
|
16
jsdoc-master/test/fixtures/constructstag2.js
vendored
Normal file
16
jsdoc-master/test/fixtures/constructstag2.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
Classify('Menu',
|
||||
/**
|
||||
@constructs Menu
|
||||
@param items
|
||||
*/
|
||||
function (items) {
|
||||
|
||||
},
|
||||
{
|
||||
/**
|
||||
@memberof Menu#
|
||||
*/
|
||||
show: function(){
|
||||
}
|
||||
}
|
||||
);
|
26
jsdoc-master/test/fixtures/constructstag3.js
vendored
Normal file
26
jsdoc-master/test/fixtures/constructstag3.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
A class that represents a person.
|
||||
@class
|
||||
*/
|
||||
var Person = Class.create({
|
||||
|
||||
/**
|
||||
@constructs Person
|
||||
@param {string} name
|
||||
*/
|
||||
initialize: function(name) {
|
||||
|
||||
/** The name of the person. */
|
||||
this.name = name;
|
||||
},
|
||||
|
||||
/**
|
||||
@memberof Person#
|
||||
@param {string} message
|
||||
*/
|
||||
say: function(message) {
|
||||
|
||||
/** The person's message. */
|
||||
this.message = message;
|
||||
}
|
||||
});
|
24
jsdoc-master/test/fixtures/constructstag4.js
vendored
Normal file
24
jsdoc-master/test/fixtures/constructstag4.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
var Person = Class.create(/** @lends Person# */{
|
||||
|
||||
/**
|
||||
Describe the constructor.
|
||||
@classdesc A class that represents a person.
|
||||
@constructs
|
||||
@param {string} name
|
||||
*/
|
||||
initialize: function(name) {
|
||||
|
||||
/** The name of the person. */
|
||||
this.name = name;
|
||||
},
|
||||
|
||||
/**
|
||||
@param {string} message
|
||||
*/
|
||||
say: function(message) {
|
||||
|
||||
/** The person's message. */
|
||||
this.message = message;
|
||||
}
|
||||
});
|
||||
|
14
jsdoc-master/test/fixtures/constructstag5.js
vendored
Normal file
14
jsdoc-master/test/fixtures/constructstag5.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
Duck = (function() {
|
||||
return /** @lends Duck# */ {
|
||||
/**
|
||||
Constructs a duck.
|
||||
@constructs
|
||||
@param tog
|
||||
*/
|
||||
constructor: function(tog) {
|
||||
},
|
||||
/** Say hello. */
|
||||
quack: function() {
|
||||
}
|
||||
}
|
||||
})();
|
6
jsdoc-master/test/fixtures/copyrighttag.js
vendored
Normal file
6
jsdoc-master/test/fixtures/copyrighttag.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/** @constructor
|
||||
@copyright (c) 2011 Michael Mathews
|
||||
*/
|
||||
function Thingy() {
|
||||
|
||||
}
|
34
jsdoc-master/test/fixtures/defaulttag.js
vendored
Normal file
34
jsdoc-master/test/fixtures/defaulttag.js
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
@default
|
||||
*/
|
||||
var request = null;
|
||||
|
||||
/**
|
||||
@default
|
||||
*/
|
||||
var response = 'ok';
|
||||
|
||||
/**
|
||||
@default
|
||||
*/
|
||||
var rcode = 200;
|
||||
|
||||
/**
|
||||
@default
|
||||
*/
|
||||
var rvalid = true;
|
||||
|
||||
/**
|
||||
@default
|
||||
*/
|
||||
var rerrored = false;
|
||||
|
||||
/**
|
||||
@default the parent window
|
||||
*/
|
||||
var win = getParentWindow();
|
||||
|
||||
/**
|
||||
@default
|
||||
*/
|
||||
var header = getHeaders(request);
|
11
jsdoc-master/test/fixtures/deprecatedtag.js
vendored
Normal file
11
jsdoc-master/test/fixtures/deprecatedtag.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/** @deprecated
|
||||
*/
|
||||
function foo() {
|
||||
|
||||
}
|
||||
|
||||
/** @deprecated since version 2.0
|
||||
*/
|
||||
function bar() {
|
||||
|
||||
}
|
7
jsdoc-master/test/fixtures/descriptiontag.js
vendored
Normal file
7
jsdoc-master/test/fixtures/descriptiontag.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/** Blah Blah Blah
|
||||
* @desc halb halb halb
|
||||
*/
|
||||
var x;
|
||||
|
||||
/** @description lkjasdf */
|
||||
var y;
|
5
jsdoc-master/test/fixtures/destructuring.js
vendored
Normal file
5
jsdoc-master/test/fixtures/destructuring.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
A builder function for the Stick application;
|
||||
@var {function} Application
|
||||
*/
|
||||
var {Application} = require("stick");
|
23
jsdoc-master/test/fixtures/doclet.js
vendored
Normal file
23
jsdoc-master/test/fixtures/doclet.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
Markdown asterisks in a doclet that does not use leading asterisks.
|
||||
**Strong** is strong.
|
||||
|
||||
* List item 1.
|
||||
* List item 2.
|
||||
@param {string} thingy - The thingy.
|
||||
*/
|
||||
function test1(thingy) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Markdown asterisks in a doclet that uses leading asterisks.
|
||||
* **Strong** is strong.
|
||||
*
|
||||
* * List item 1.
|
||||
* * List item 2.
|
||||
* @param {string} thingy - The thingy.
|
||||
*/
|
||||
function test2(thingy) {
|
||||
|
||||
}
|
11
jsdoc-master/test/fixtures/enumtag.js
vendored
Normal file
11
jsdoc-master/test/fixtures/enumtag.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Enum for tri-state values.
|
||||
* @enum {number}
|
||||
*/
|
||||
var TriState = {
|
||||
/** true */
|
||||
TRUE: 1,
|
||||
FALSE: -1,
|
||||
/** @type {boolean} */
|
||||
MAYBE: true
|
||||
};
|
30
jsdoc-master/test/fixtures/eventfirestag.js
vendored
Normal file
30
jsdoc-master/test/fixtures/eventfirestag.js
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
var Hurl = function () {
|
||||
};
|
||||
|
||||
/**
|
||||
* Throw a snowball.
|
||||
*
|
||||
* @fires Hurl#snowball
|
||||
* @fires Hurl#event:brick
|
||||
*/
|
||||
Hurl.prototype.snowball = function () {
|
||||
/**
|
||||
* @event Hurl#snowball
|
||||
*/
|
||||
this.emit('snowball', {});
|
||||
};
|
||||
|
||||
/**
|
||||
* Throw a football match.
|
||||
*
|
||||
* @emits Hurl#footballMatch
|
||||
*/
|
||||
Hurl.prototype.footballMatch = function () {
|
||||
/**
|
||||
* @event Hurl#footballMatch
|
||||
*/
|
||||
this.emit('footballMatch', {});
|
||||
};
|
14
jsdoc-master/test/fixtures/exampletag.js
vendored
Normal file
14
jsdoc-master/test/fixtures/exampletag.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
/** @example
|
||||
* console.log("foo");
|
||||
* console.log("bar");
|
||||
*/
|
||||
var x;
|
||||
|
||||
/** @example
|
||||
* console.log("foo");
|
||||
* console.log("bar");
|
||||
* @example
|
||||
* <caption>Example 2</caption>
|
||||
* 1 + 2;
|
||||
*/
|
||||
var y;
|
20
jsdoc-master/test/fixtures/exceptiontag.js
vendored
Normal file
20
jsdoc-master/test/fixtures/exceptiontag.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
@throws {InvalidArgumentException}
|
||||
*/
|
||||
function foo(x) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@exception Will throw an error if argument is null.
|
||||
*/
|
||||
function bar(x) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@exception {DivideByZero} Argument x must be non-zero.
|
||||
*/
|
||||
function pez(x) {
|
||||
|
||||
}
|
15
jsdoc-master/test/fixtures/exports.js
vendored
Normal file
15
jsdoc-master/test/fixtures/exports.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* An example of a server-side JavaScript module.
|
||||
* @module hello/world
|
||||
* @example
|
||||
* var g = require('hello/world').sayHello('Gracie');
|
||||
*/
|
||||
|
||||
/**
|
||||
* Generate a greeting.
|
||||
* @param {string} [subject="world"] To whom we greet.
|
||||
* @returns {string}
|
||||
*/
|
||||
exports.sayHello = function(subject) {
|
||||
return 'Hello ' + (subject || 'World');
|
||||
};
|
20
jsdoc-master/test/fixtures/exportstag.js
vendored
Normal file
20
jsdoc-master/test/fixtures/exportstag.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
define(function () {
|
||||
/**
|
||||
A module representing a shirt.
|
||||
@exports my/shirt
|
||||
@version 1.0
|
||||
*/
|
||||
var shirt = {
|
||||
|
||||
/** A property of the module. */
|
||||
color: "black",
|
||||
|
||||
/** @constructor */
|
||||
Turtleneck: function(size) {
|
||||
/** A property of the class. */
|
||||
this.size = size;
|
||||
}
|
||||
};
|
||||
|
||||
return shirt;
|
||||
});
|
18
jsdoc-master/test/fixtures/exportstag2.js
vendored
Normal file
18
jsdoc-master/test/fixtures/exportstag2.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
define(
|
||||
["my/buttons"],
|
||||
function () {
|
||||
/**
|
||||
A module representing a coat.
|
||||
@exports my/coat
|
||||
@requires my/buttons
|
||||
@version 1.0
|
||||
*/
|
||||
var myModule = function(wool) {
|
||||
/** document me */
|
||||
this.wool = wool;
|
||||
}
|
||||
|
||||
return myModule;
|
||||
|
||||
}
|
||||
);
|
22
jsdoc-master/test/fixtures/exportstag3.js
vendored
Normal file
22
jsdoc-master/test/fixtures/exportstag3.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
define(
|
||||
/**
|
||||
Utility functions to ease working with DOM elements.
|
||||
@exports html/utils
|
||||
*/
|
||||
function () {
|
||||
|
||||
var exports = {
|
||||
/** Get the value of a property on an element. */
|
||||
getStyleProperty: function(element, propertyName) {
|
||||
// ...
|
||||
}
|
||||
};
|
||||
|
||||
/** Determine if an element is in the document head. */
|
||||
exports.isInHead = function(element) {
|
||||
// ...
|
||||
}
|
||||
|
||||
return exports;
|
||||
}
|
||||
);
|
12
jsdoc-master/test/fixtures/exportstag4.js
vendored
Normal file
12
jsdoc-master/test/fixtures/exportstag4.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
define(
|
||||
/** @exports some/module */
|
||||
function () {
|
||||
/** @class */
|
||||
function myClass() {}
|
||||
|
||||
/** Some method */
|
||||
myClass.prototype.myMethod = function () {};
|
||||
|
||||
return new myClass();
|
||||
}
|
||||
);
|
24
jsdoc-master/test/fixtures/externals.js
vendored
Normal file
24
jsdoc-master/test/fixtures/externals.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* The built in string object.
|
||||
* @external String
|
||||
* @see {@link https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String String}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Adds a new method to the built-in string.
|
||||
* @function external:String#rot13
|
||||
* @example
|
||||
* var greeting = new String('hello world');
|
||||
* console.log( greeting.rot13() ); // uryyb jbeyq
|
||||
*/
|
||||
|
||||
/**
|
||||
* The jQuery plugin namespace.
|
||||
* @external "jQuery.fn"
|
||||
* @see {@link http://docs.jquery.com/Plugins/Authoring The jQuery Plugin Guide}
|
||||
*/
|
||||
|
||||
/**
|
||||
* A jQuery plugin to make stars fly around your home page.
|
||||
* @function external:"jQuery.fn".starfairy
|
||||
*/
|
11
jsdoc-master/test/fixtures/externals2.js
vendored
Normal file
11
jsdoc-master/test/fixtures/externals2.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
Namespace provided by the browser.
|
||||
@external XMLHttpRequest
|
||||
@see https://developer.mozilla.org/en/xmlhttprequest
|
||||
*/
|
||||
|
||||
/**
|
||||
Extends the built in XMLHttpRequest to send data encoded with a secret key.
|
||||
@class EncryptedRequest
|
||||
@extends external:XMLHttpRequest
|
||||
*/
|
7
jsdoc-master/test/fixtures/file.js
vendored
Normal file
7
jsdoc-master/test/fixtures/file.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @overview This is a file doclet.
|
||||
* @copyright Michael Mathews 2011
|
||||
*/
|
||||
|
||||
function ignoreMe() {
|
||||
}
|
7
jsdoc-master/test/fixtures/functiontag.js
vendored
Normal file
7
jsdoc-master/test/fixtures/functiontag.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/** @func Foo */
|
||||
function Foo() {
|
||||
}
|
||||
|
||||
/** @method */
|
||||
function Bar() {
|
||||
}
|
37
jsdoc-master/test/fixtures/getset.js
vendored
Normal file
37
jsdoc-master/test/fixtures/getset.js
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/** @class */
|
||||
var Person = makeClass(
|
||||
/** @lends Person# */
|
||||
{
|
||||
/** Set up initial values. */
|
||||
initialize: function(name) {
|
||||
},
|
||||
|
||||
/** Speak a message. */
|
||||
say: function(message) {
|
||||
return this.name + " says: " + message;
|
||||
},
|
||||
|
||||
/**
|
||||
* The name of the person.
|
||||
* @type {string}
|
||||
*/
|
||||
get name() {
|
||||
return this._name;
|
||||
},
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
* @param val
|
||||
*/
|
||||
set name(val) {
|
||||
this._name = name;
|
||||
},
|
||||
|
||||
/**
|
||||
* @type {number}
|
||||
*/
|
||||
get age() {
|
||||
return 25;
|
||||
}
|
||||
}
|
||||
);
|
16
jsdoc-master/test/fixtures/globaltag.js
vendored
Normal file
16
jsdoc-master/test/fixtures/globaltag.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
@global
|
||||
@constructor
|
||||
*/
|
||||
window.Bar = new Function('', a, b, c);
|
||||
|
||||
(function() {
|
||||
|
||||
/** @global */
|
||||
var foo;
|
||||
|
||||
foo = 'hello foo';
|
||||
|
||||
this.foo = foo;
|
||||
|
||||
}).apply(window);
|
6
jsdoc-master/test/fixtures/ignoretag.js
vendored
Normal file
6
jsdoc-master/test/fixtures/ignoretag.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
@ignore
|
||||
*/
|
||||
function foo(x) {
|
||||
|
||||
}
|
6
jsdoc-master/test/fixtures/ignoretag2.js
vendored
Normal file
6
jsdoc-master/test/fixtures/ignoretag2.js
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
@ignore value that shouldn't be here
|
||||
*/
|
||||
function foo(x) {
|
||||
|
||||
}
|
3
jsdoc-master/test/fixtures/include.js
vendored
Normal file
3
jsdoc-master/test/fixtures/include.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// Used to test jsdoc/util/include
|
||||
var myGlobal = require('jsdoc/util/global');
|
||||
myGlobal.__globalForIncludeTest__++;
|
2
jsdoc-master/test/fixtures/inlinecomment.js
vendored
Normal file
2
jsdoc-master/test/fixtures/inlinecomment.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** Inline Comment 1 */ this.test = function(){}
|
||||
/** Inline Comment 2 */ this.test2 = function(){};
|
7
jsdoc-master/test/fixtures/inner.js
vendored
Normal file
7
jsdoc-master/test/fixtures/inner.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
function sendMessage(text) {
|
||||
/** document me */
|
||||
var encoding = 'utf8';
|
||||
|
||||
/** document me */
|
||||
function encrypt(){}
|
||||
}
|
18
jsdoc-master/test/fixtures/innerscope.js
vendored
Normal file
18
jsdoc-master/test/fixtures/innerscope.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/** @constructor */
|
||||
function Message(to) {
|
||||
|
||||
var headers = {},
|
||||
response;
|
||||
|
||||
/** document me */
|
||||
headers.to = to;
|
||||
|
||||
(function() {
|
||||
/** document me */
|
||||
response.code = '200';
|
||||
|
||||
/** document me */
|
||||
headers.from = '';
|
||||
})()
|
||||
}
|
||||
|
19
jsdoc-master/test/fixtures/innerscope2.js
vendored
Normal file
19
jsdoc-master/test/fixtures/innerscope2.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/** @constructor */
|
||||
function Message(to) {
|
||||
|
||||
var headers = {};
|
||||
|
||||
/** document me */
|
||||
headers.to = to;
|
||||
|
||||
(function() {
|
||||
var headers = {
|
||||
/** document me */
|
||||
cache: {}
|
||||
};
|
||||
|
||||
/** document me */
|
||||
headers.from = '';
|
||||
})()
|
||||
}
|
||||
|
3
jsdoc-master/test/fixtures/jshint/badfile.js
vendored
Normal file
3
jsdoc-master/test/fixtures/jshint/badfile.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
foo();
|
||||
|
||||
function foo() {}
|
1
jsdoc-master/test/fixtures/jshint/goodfile.js
vendored
Normal file
1
jsdoc-master/test/fixtures/jshint/goodfile.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var foo = 0;
|
24
jsdoc-master/test/fixtures/jslangnames.js
vendored
Normal file
24
jsdoc-master/test/fixtures/jslangnames.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
/** @namespace */
|
||||
var constructor = {
|
||||
/** document me */
|
||||
toString: function(){}
|
||||
};
|
||||
|
||||
/** @namespace */
|
||||
var prototye = {
|
||||
/** document me */
|
||||
valueOf: function(){}
|
||||
}
|
||||
|
||||
/**
|
||||
This is Object
|
||||
@namespace Object
|
||||
*/
|
||||
|
||||
/**
|
||||
This is Object.hasOwnProperty
|
||||
@method Object.hasOwnProperty
|
||||
*/
|
||||
|
||||
// NOTE: you can't document a prototype of an object in JSDoc -- seriously, you just can't
|
2
jsdoc-master/test/fixtures/kindtag.js
vendored
Normal file
2
jsdoc-master/test/fixtures/kindtag.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** @kind function */
|
||||
var x;
|
16
jsdoc-master/test/fixtures/lends.js
vendored
Normal file
16
jsdoc-master/test/fixtures/lends.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/** @class */
|
||||
var Person = makeClass(
|
||||
/** @lends Person# */
|
||||
{
|
||||
/** Set up initial values. */
|
||||
initialize: function(name) {
|
||||
/** The name of the person. */
|
||||
this.name = name;
|
||||
},
|
||||
|
||||
/** Speak a message. */
|
||||
say: function(message) {
|
||||
return this.name + " says: " + message;
|
||||
}
|
||||
}
|
||||
);
|
18
jsdoc-master/test/fixtures/lends2.js
vendored
Normal file
18
jsdoc-master/test/fixtures/lends2.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
|
||||
var Person = makeClass(
|
||||
/** @lends Person# */
|
||||
{
|
||||
/** Construct a Person.
|
||||
@constructs Person
|
||||
*/
|
||||
initialize: function(name) {
|
||||
/** The name of the person. */
|
||||
this.name = name;
|
||||
},
|
||||
|
||||
/** Speak a message. */
|
||||
say: function(message) {
|
||||
return this.name + " says: " + message;
|
||||
}
|
||||
}
|
||||
);
|
18
jsdoc-master/test/fixtures/lends3.js
vendored
Normal file
18
jsdoc-master/test/fixtures/lends3.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
/** @class */
|
||||
var Person = makeClass(
|
||||
/**
|
||||
* @lends Person#
|
||||
*/
|
||||
{
|
||||
/** Set up initial values. */
|
||||
initialize: function(name) {
|
||||
/** The name of the person. */
|
||||
this.name = name;
|
||||
},
|
||||
|
||||
/** Speak a message. */
|
||||
say: function(message) {
|
||||
return this.name + " says: " + message;
|
||||
}
|
||||
}
|
||||
);
|
14
jsdoc-master/test/fixtures/lendsglobal.js
vendored
Normal file
14
jsdoc-master/test/fixtures/lendsglobal.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
declare({
|
||||
globals: /** @lends */ {
|
||||
|
||||
/** document me */
|
||||
'test': function() { },
|
||||
|
||||
/** @namespace */
|
||||
'test1': {
|
||||
|
||||
/** document me */
|
||||
'test2': function() { }
|
||||
}
|
||||
}
|
||||
});
|
2
jsdoc-master/test/fixtures/licensetag.js
vendored
Normal file
2
jsdoc-master/test/fixtures/licensetag.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/** @license GPL v2 */
|
||||
var x;
|
15
jsdoc-master/test/fixtures/linktag.js
vendored
Normal file
15
jsdoc-master/test/fixtures/linktag.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/** @namespace ns */
|
||||
var ns = {};
|
||||
|
||||
/**
|
||||
* Similar to [the bar function]{@link bar}.
|
||||
* @see {@link bar}
|
||||
*/
|
||||
ns.foo = function () {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see {@link ns.foo}
|
||||
*/
|
||||
function bar() {
|
||||
}
|
34
jsdoc-master/test/fixtures/listenstag.js
vendored
Normal file
34
jsdoc-master/test/fixtures/listenstag.js
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/** @module myModule */
|
||||
|
||||
/** An event (has listeners).
|
||||
* @event MyEvent
|
||||
* @memberof module:myModule
|
||||
* @param {number} foo - asdf. */
|
||||
|
||||
/** A handler.
|
||||
* @listens module:myModule.MyEvent
|
||||
* @listens module:myModule~Events.event:Event2
|
||||
* @listens fakeEvent
|
||||
*/
|
||||
function MyHandler() {
|
||||
}
|
||||
|
||||
/** Another handler.
|
||||
* @listens module:myModule.MyEvent
|
||||
*/
|
||||
function AnotherHandler() {
|
||||
}
|
||||
|
||||
/** a namespace.
|
||||
* @namespace */
|
||||
var Events = {
|
||||
};
|
||||
|
||||
/** Another event (has listeners).
|
||||
* @event Event2
|
||||
* @memberof module:myModule~Events
|
||||
*/
|
||||
|
||||
/** An event with no listeners.
|
||||
* @event module:myModule#Event3 */
|
||||
|
10
jsdoc-master/test/fixtures/markdowntest.md
vendored
Normal file
10
jsdoc-master/test/fixtures/markdowntest.md
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
This is a header
|
||||
----
|
||||
|
||||
This is some text.
|
||||
|
||||
this is some code
|
||||
|
||||
* this
|
||||
* a
|
||||
* list
|
11
jsdoc-master/test/fixtures/memberoftag.js
vendored
Normal file
11
jsdoc-master/test/fixtures/memberoftag.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/** @constructor
|
||||
@memberof mathlib
|
||||
*/
|
||||
function Data() {
|
||||
|
||||
/** @member */
|
||||
this.point = {};
|
||||
}
|
||||
|
||||
/** @namespace */
|
||||
mathlib = {Data: Data};
|
10
jsdoc-master/test/fixtures/memberoftag2.js
vendored
Normal file
10
jsdoc-master/test/fixtures/memberoftag2.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
create(
|
||||
'Observable',
|
||||
{
|
||||
/** @memberof Observable */
|
||||
cache: [],
|
||||
|
||||
/** @memberof Observable.prototype */
|
||||
publish: function(msg) {}
|
||||
}
|
||||
);
|
19
jsdoc-master/test/fixtures/memberoftag3.js
vendored
Normal file
19
jsdoc-master/test/fixtures/memberoftag3.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/** @module terrain
|
||||
@example
|
||||
var terrain = require('terrain'),
|
||||
forest = new terrain.Forest(),
|
||||
tree = new forest.Tree();
|
||||
*/
|
||||
|
||||
/** @class */
|
||||
exports.Forest = function(){}
|
||||
var Forest = exports.Forest;
|
||||
|
||||
/**
|
||||
@class
|
||||
@memberof module:terrain
|
||||
*/
|
||||
Forest.prototype.Tree = function() {
|
||||
/** A leaf */
|
||||
this.leaf = 1;
|
||||
}
|
16
jsdoc-master/test/fixtures/memberoftag4.js
vendored
Normal file
16
jsdoc-master/test/fixtures/memberoftag4.js
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Namespace doStuff.
|
||||
* @namespace doStuff
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function with the same name as its namespace.
|
||||
* @memberof doStuff
|
||||
*/
|
||||
function doStuff() {}
|
||||
|
||||
/**
|
||||
* Function with a different name than the namespace.
|
||||
* @memberof doStuff
|
||||
*/
|
||||
function doOtherStuff() {}
|
44
jsdoc-master/test/fixtures/memberoftagforced.js
vendored
Normal file
44
jsdoc-master/test/fixtures/memberoftagforced.js
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
/** @constructor
|
||||
*/
|
||||
function Data() {
|
||||
|
||||
/**
|
||||
The current position.
|
||||
@type {object}
|
||||
@property {boolean} needsRevalidate Does this point need to be revalidated?
|
||||
*/
|
||||
this.point = {
|
||||
/**
|
||||
The x coordinate of the point.
|
||||
@type {number}
|
||||
@name point.x
|
||||
@memberof! Data#
|
||||
*/
|
||||
x: 0,
|
||||
|
||||
/**
|
||||
The y coordinate of the point.
|
||||
@type {number}
|
||||
@name point.y
|
||||
@memberof! Data#
|
||||
@see {@link Data#point.x}
|
||||
*/
|
||||
y: 0,
|
||||
|
||||
needsRevalidate: false
|
||||
};
|
||||
}
|
||||
|
||||
var map = {
|
||||
/**
|
||||
@type {Array}
|
||||
@name map.routes
|
||||
@memberof! <global>
|
||||
@property {Data#point} point
|
||||
*/
|
||||
routes: []
|
||||
}
|
||||
|
||||
/** The current cursor. */
|
||||
var cursor = {};
|
5
jsdoc-master/test/fixtures/membertag.js
vendored
Normal file
5
jsdoc-master/test/fixtures/membertag.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/** @member */
|
||||
var x;
|
||||
|
||||
/** @var foobar */
|
||||
/** @var {string} baz */
|
27
jsdoc-master/test/fixtures/mixintag.js
vendored
Normal file
27
jsdoc-master/test/fixtures/mixintag.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* This provides methods used for event handling. It's not meant to
|
||||
* be used directly, except as a provider of related methods.
|
||||
*
|
||||
* @mixin
|
||||
*/
|
||||
var Eventful = {
|
||||
/** fires something. */
|
||||
fires: function () {},
|
||||
/** handles a signal. */
|
||||
on: function () {}
|
||||
};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @mixes Eventful
|
||||
*/
|
||||
var FormButton = function() {
|
||||
};
|
||||
|
||||
/** @mixin AnotherMixin*/
|
||||
|
||||
/** I mix in multiple things
|
||||
* @constructor MyClass
|
||||
* @mixes Eventful
|
||||
* @mixes AnotherMixin */
|
||||
|
28
jsdoc-master/test/fixtures/moduleinner.js
vendored
Normal file
28
jsdoc-master/test/fixtures/moduleinner.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @module my/module
|
||||
*/
|
||||
(function() {
|
||||
|
||||
/** document fooIn */
|
||||
fooIn = function() {
|
||||
};
|
||||
|
||||
/** @namespace */
|
||||
bar = {
|
||||
/** document bar.Zop */
|
||||
zop: function() {
|
||||
}
|
||||
}
|
||||
|
||||
/** @constructor */
|
||||
exports.Frotz = function() {
|
||||
/** document exports.Frotz#quaz */
|
||||
this.quaz = 1;
|
||||
}
|
||||
|
||||
}) ();
|
||||
|
||||
/** document fooOut
|
||||
*/
|
||||
fooOut = function() {
|
||||
};
|
17
jsdoc-master/test/fixtures/moduleisconstructor.js
vendored
Normal file
17
jsdoc-master/test/fixtures/moduleisconstructor.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
Describe the module here.
|
||||
@module mymodule/config
|
||||
*/
|
||||
|
||||
/**
|
||||
Create a new configuration
|
||||
@param {string} id
|
||||
@constructor
|
||||
@alias module:mymodule/config
|
||||
*/
|
||||
function Config(id) {
|
||||
/** Document me. */
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
module.exports = Config;
|
10
jsdoc-master/test/fixtures/moduleisfunction.js
vendored
Normal file
10
jsdoc-master/test/fixtures/moduleisfunction.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* This is a module called foo.
|
||||
* @module foo
|
||||
*/
|
||||
|
||||
/**
|
||||
* The module exports a single function.
|
||||
* @param {string} bar
|
||||
*/
|
||||
module.exports = function(bar) {};
|
5
jsdoc-master/test/fixtures/modules/data/mod-1.js
vendored
Normal file
5
jsdoc-master/test/fixtures/modules/data/mod-1.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/** @module */
|
||||
define({
|
||||
property: "foo",
|
||||
method: function() {}
|
||||
});
|
5
jsdoc-master/test/fixtures/modules/data/mod-2.js
vendored
Normal file
5
jsdoc-master/test/fixtures/modules/data/mod-2.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/** @module my/module/name */
|
||||
define({
|
||||
property: "foo",
|
||||
method: function() {}
|
||||
});
|
21
jsdoc-master/test/fixtures/modules/data/mod-3.js
vendored
Normal file
21
jsdoc-master/test/fixtures/modules/data/mod-3.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
My test module.
|
||||
@module my/module
|
||||
*/
|
||||
define(function() {
|
||||
|
||||
/**
|
||||
@undocumented
|
||||
@alias module:my/module
|
||||
*/
|
||||
var mod = {
|
||||
|
||||
/** Document a property. */
|
||||
myProperty: "foo",
|
||||
|
||||
/** Document a method. */
|
||||
myMethod: function() {}
|
||||
};
|
||||
|
||||
return mod;
|
||||
});
|
11
jsdoc-master/test/fixtures/moduletag.js
vendored
Normal file
11
jsdoc-master/test/fixtures/moduletag.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @module bookshelf
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
this.Book = function(title) {
|
||||
/** document me */
|
||||
this.title = title;
|
||||
}
|
9
jsdoc-master/test/fixtures/moduletag2.js
vendored
Normal file
9
jsdoc-master/test/fixtures/moduletag2.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/** @module color/mixer */
|
||||
|
||||
module.exports = {
|
||||
/** Blend two colors together. */
|
||||
blend: function(color1, color2) { }
|
||||
}
|
||||
|
||||
/** Darken a color by the given shade. */
|
||||
exports.darken = function(color, shade) { }
|
20
jsdoc-master/test/fixtures/moduletag3.js
vendored
Normal file
20
jsdoc-master/test/fixtures/moduletag3.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
@module foo/Photo/manager
|
||||
@desc Manage a collection of photos.
|
||||
*/
|
||||
|
||||
/**
|
||||
Construct a new Photo manager
|
||||
@constructor module:foo/Photo/manager
|
||||
@param {String} collectionId The identifier of the managed collection.
|
||||
*/
|
||||
module.exports = function(collectionId) {
|
||||
|
||||
/**
|
||||
@function module:foo/Photo/manager#getPhoto
|
||||
@param {String} photoName
|
||||
*/
|
||||
this.getPhoto = function() {}
|
||||
|
||||
}
|
||||
|
7
jsdoc-master/test/fixtures/namedFuncStatement.js
vendored
Normal file
7
jsdoc-master/test/fixtures/namedFuncStatement.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/** @class */
|
||||
var Foo = function Bar(a) {
|
||||
/** document me */
|
||||
var var1 = 1;
|
||||
/** document me */
|
||||
this.member1 = 2;
|
||||
};
|
7
jsdoc-master/test/fixtures/namedFuncStatement2.js
vendored
Normal file
7
jsdoc-master/test/fixtures/namedFuncStatement2.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/** @class */
|
||||
Foo = function Bar(a) {
|
||||
/** document me */
|
||||
var var1 = 1;
|
||||
/** document me */
|
||||
this.member1 = 2;
|
||||
};
|
9
jsdoc-master/test/fixtures/namedFuncStatement3.js
vendored
Normal file
9
jsdoc-master/test/fixtures/namedFuncStatement3.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
ns = {
|
||||
/** @class */
|
||||
Foo: function Bar(a) {
|
||||
/** document me */
|
||||
var var1 = 1;
|
||||
/** document me */
|
||||
this.member1 = 2;
|
||||
}
|
||||
};
|
5
jsdoc-master/test/fixtures/namespacetag.js
vendored
Normal file
5
jsdoc-master/test/fixtures/namespacetag.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/** @namespace */
|
||||
var x = {
|
||||
};
|
||||
/** @namespace Foo */
|
||||
/** @namespace {function} Bar */
|
8
jsdoc-master/test/fixtures/objectlit.js
vendored
Normal file
8
jsdoc-master/test/fixtures/objectlit.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/** document me */
|
||||
var tools = {
|
||||
/** document me */
|
||||
serialiser: {
|
||||
/** document me */
|
||||
value: ''
|
||||
}
|
||||
};
|
8
jsdoc-master/test/fixtures/objectlit2.js
vendored
Normal file
8
jsdoc-master/test/fixtures/objectlit2.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/** document me */
|
||||
var position = {
|
||||
axis: {
|
||||
/** document me */
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
};
|
22
jsdoc-master/test/fixtures/objectpropertykeys.js
vendored
Normal file
22
jsdoc-master/test/fixtures/objectpropertykeys.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
Call(
|
||||
{
|
||||
methodA: function()
|
||||
{
|
||||
this.id = this.createUUID();
|
||||
},
|
||||
|
||||
valueOf: function()
|
||||
{
|
||||
return this.id;
|
||||
},
|
||||
|
||||
toString: function()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
});
|
||||
|
||||
//Simple inheritance model with correct constructor
|
||||
function Test() {}
|
||||
function Test2() { Test.call(this); }
|
||||
Test2.prototype = Object.create(Test.prototype, {constructor: {value: Test2}});
|
47
jsdoc-master/test/fixtures/paramtag.js
vendored
Normal file
47
jsdoc-master/test/fixtures/paramtag.js
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @param { String | Array<String>} targetName The name (or names) of what to find.
|
||||
*/
|
||||
function find(targetName) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {function} callback
|
||||
*/
|
||||
function bind(callback) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {function}
|
||||
*/
|
||||
function unbind(callback) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id The id of the element.
|
||||
*/
|
||||
function getElement(id) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ... Two or more elements.
|
||||
*/
|
||||
function combine() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param delimiter - What to split on.
|
||||
*/
|
||||
function split(delimiter) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param - If true make the commit atomic.
|
||||
*/
|
||||
function commit(atomic) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param [async=true] - whether to be asynchronous
|
||||
*/
|
||||
function request(async) {
|
||||
}
|
10
jsdoc-master/test/fixtures/plugins.js
vendored
Normal file
10
jsdoc-master/test/fixtures/plugins.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @name virtual
|
||||
*/
|
||||
|
||||
var foo = "bar";
|
||||
|
||||
/**
|
||||
* @foo bar
|
||||
*/
|
||||
var test = "tada";
|
11
jsdoc-master/test/fixtures/privatetag.js
vendored
Normal file
11
jsdoc-master/test/fixtures/privatetag.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @constructor
|
||||
* @private
|
||||
*/
|
||||
function Foo() {
|
||||
|
||||
/** document me */
|
||||
this.bar = 1;
|
||||
}
|
||||
|
||||
|
9
jsdoc-master/test/fixtures/projecttag.js
vendored
Normal file
9
jsdoc-master/test/fixtures/projecttag.js
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
An automated documentation generator for JavaScript.
|
||||
@project JSDoc
|
||||
@version 3.0.0
|
||||
@copyright 2011 (c) Michael Mathews <micmath@gmail.com>
|
||||
@license Apache Version 2 <http://www.apache.org/licenses/LICENSE-2.0>
|
||||
*/
|
||||
function blah(url) {
|
||||
}
|
13
jsdoc-master/test/fixtures/propertytag.js
vendored
Normal file
13
jsdoc-master/test/fixtures/propertytag.js
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @namespace
|
||||
* @property {Object} defaults The default values.
|
||||
* @property {Number} defaults.a The a property of the defaults.
|
||||
* @property {String} defaults.b The b property of the defaults.
|
||||
*/
|
||||
myobject = {
|
||||
defaults: {
|
||||
a: 1,
|
||||
b: "Hit the light",
|
||||
c: true
|
||||
}
|
||||
};
|
19
jsdoc-master/test/fixtures/quotename.js
vendored
Normal file
19
jsdoc-master/test/fixtures/quotename.js
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/** @namespace */
|
||||
var chat = {};
|
||||
|
||||
/**
|
||||
@namespace
|
||||
*/
|
||||
chat["#channel"] = {};
|
||||
|
||||
|
||||
/**
|
||||
@member
|
||||
@type {boolean}
|
||||
@defaultvalue
|
||||
*/
|
||||
chat["#channel"].open = true;
|
||||
|
||||
/**
|
||||
@event chat."#channel"."op:announce-motd"
|
||||
*/
|
10
jsdoc-master/test/fixtures/quotename2.js
vendored
Normal file
10
jsdoc-master/test/fixtures/quotename2.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/** @namespace */
|
||||
var contacts = {
|
||||
|
||||
/** @namespace */
|
||||
'say-"hello"@example.com': {
|
||||
|
||||
/** document me */
|
||||
"username": 'Sue Smart'
|
||||
}
|
||||
}
|
10
jsdoc-master/test/fixtures/readonlytag.js
vendored
Normal file
10
jsdoc-master/test/fixtures/readonlytag.js
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function Collection() {
|
||||
|
||||
/** @readonly */
|
||||
this.length = 0;
|
||||
}
|
||||
|
||||
|
12
jsdoc-master/test/fixtures/requirestag.js
vendored
Normal file
12
jsdoc-master/test/fixtures/requirestag.js
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @requires module:foo/helper
|
||||
*/
|
||||
function foo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires foo
|
||||
* @requires Pez#blat this text is ignored
|
||||
*/
|
||||
function bar() {
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user