jsdoc 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +20 -0
- data/README.rdoc +17 -0
- data/VERSION +1 -0
- data/bin/jsdoc +5 -0
- data/jsdoc.gemspec +162 -0
- data/lib/jsdoc-toolkit-2.4.0/README.txt +183 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame.js +33 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame/Chain.js +102 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame/Dumper.js +144 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame/Hash.js +84 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame/Link.js +173 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame/Namespace.js +10 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame/Opt.js +134 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame/Reflection.js +26 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame/String.js +93 -0
- data/lib/jsdoc-toolkit-2.4.0/app/frame/Testrun.js +129 -0
- data/lib/jsdoc-toolkit-2.4.0/app/handlers/FOODOC.js +26 -0
- data/lib/jsdoc-toolkit-2.4.0/app/handlers/XMLDOC.js +26 -0
- data/lib/jsdoc-toolkit-2.4.0/app/handlers/XMLDOC/DomReader.js +159 -0
- data/lib/jsdoc-toolkit-2.4.0/app/handlers/XMLDOC/XMLDoc.js +16 -0
- data/lib/jsdoc-toolkit-2.4.0/app/handlers/XMLDOC/XMLParse.js +292 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC.js +106 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/DocComment.js +204 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/DocTag.js +294 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/JsDoc.js +140 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/JsPlate.js +109 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/Lang.js +144 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/Parser.js +146 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/PluginManager.js +33 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/Symbol.js +644 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/SymbolSet.js +243 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/TextStream.js +41 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/Token.js +18 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/TokenReader.js +332 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/TokenStream.js +133 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/Util.js +32 -0
- data/lib/jsdoc-toolkit-2.4.0/app/lib/JSDOC/Walker.js +507 -0
- data/lib/jsdoc-toolkit-2.4.0/app/main.js +111 -0
- data/lib/jsdoc-toolkit-2.4.0/app/plugins/commentSrcJson.js +20 -0
- data/lib/jsdoc-toolkit-2.4.0/app/plugins/frameworkPrototype.js +16 -0
- data/lib/jsdoc-toolkit-2.4.0/app/plugins/functionCall.js +10 -0
- data/lib/jsdoc-toolkit-2.4.0/app/plugins/publishSrcHilite.js +62 -0
- data/lib/jsdoc-toolkit-2.4.0/app/plugins/symbolLink.js +10 -0
- data/lib/jsdoc-toolkit-2.4.0/app/plugins/tagParamConfig.js +31 -0
- data/lib/jsdoc-toolkit-2.4.0/app/plugins/tagSynonyms.js +43 -0
- data/lib/jsdoc-toolkit-2.4.0/app/run.js +348 -0
- data/lib/jsdoc-toolkit-2.4.0/app/t/TestDoc.js +144 -0
- data/lib/jsdoc-toolkit-2.4.0/app/t/runner.js +13 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test.js +342 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/addon.js +24 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/anon_inner.js +14 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/augments.js +31 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/augments2.js +26 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/borrows.js +46 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/borrows2.js +23 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/config.js +22 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/constructs.js +18 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/encoding.js +10 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/encoding_other.js +12 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/event.js +54 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/exports.js +14 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/functions_anon.js +39 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/functions_nested.js +33 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/global.js +13 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/globals.js +25 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/ignore.js +10 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/inner.js +16 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/jsdoc_test.js +477 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/lend.js +33 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/memberof.js +19 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/memberof2.js +38 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/memberof3.js +33 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/memberof_constructor.js +17 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/module.js +17 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/multi_methods.js +25 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/name.js +19 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/namespace_nested.js +23 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/nocode.js +13 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/oblit_anon.js +20 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/overview.js +20 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/param_inline.js +37 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/params_optional.js +8 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/prototype.js +17 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/prototype_nested.js +9 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/prototype_oblit.js +13 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/prototype_oblit_constructor.js +24 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/public.js +10 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/scripts/code.js +5 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/scripts/notcode.txt +5 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/shared.js +42 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/shared2.js +2 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/shortcuts.js +22 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/static_this.js +13 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/synonyms.js +31 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/tosource.js +23 -0
- data/lib/jsdoc-toolkit-2.4.0/app/test/variable_redefine.js +14 -0
- data/lib/jsdoc-toolkit-2.4.0/changes.txt +124 -0
- data/lib/jsdoc-toolkit-2.4.0/conf/sample.conf +31 -0
- data/lib/jsdoc-toolkit-2.4.0/java/build.xml +36 -0
- data/lib/jsdoc-toolkit-2.4.0/java/build_1.4.xml +36 -0
- data/lib/jsdoc-toolkit-2.4.0/java/classes/js.jar +0 -0
- data/lib/jsdoc-toolkit-2.4.0/java/src/JsDebugRun.java +21 -0
- data/lib/jsdoc-toolkit-2.4.0/java/src/JsRun.java +21 -0
- data/lib/jsdoc-toolkit-2.4.0/jsdebug.jar +0 -0
- data/lib/jsdoc-toolkit-2.4.0/jsrun.jar +0 -0
- data/lib/jsdoc-toolkit-2.4.0/jsrun.sh +52 -0
- data/lib/jsdoc-toolkit-2.4.0/templates/jsdoc/allclasses.tmpl +17 -0
- data/lib/jsdoc-toolkit-2.4.0/templates/jsdoc/allfiles.tmpl +56 -0
- data/lib/jsdoc-toolkit-2.4.0/templates/jsdoc/class.tmpl +649 -0
- data/lib/jsdoc-toolkit-2.4.0/templates/jsdoc/index.tmpl +39 -0
- data/lib/jsdoc-toolkit-2.4.0/templates/jsdoc/publish.js +201 -0
- data/lib/jsdoc-toolkit-2.4.0/templates/jsdoc/static/default.css +162 -0
- data/lib/jsdoc-toolkit-2.4.0/templates/jsdoc/static/header.html +2 -0
- data/lib/jsdoc-toolkit-2.4.0/templates/jsdoc/static/index.html +19 -0
- data/lib/jsdoc-toolkit-2.4.0/templates/jsdoc/symbol.tmpl +35 -0
- data/lib/jsdoc.rb +23 -0
- data/test/helper.rb +10 -0
- data/test/test_jsdoc.rb +7 -0
- metadata +199 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// /**#=+
|
|
2
|
+
// * {
|
|
3
|
+
// * 'D': 'Date.prototype',
|
|
4
|
+
// * '$N': 'Number'
|
|
5
|
+
// * }
|
|
6
|
+
// */
|
|
7
|
+
// var D = Date.prototype,
|
|
8
|
+
// $N = Number;
|
|
9
|
+
//
|
|
10
|
+
// D.locale = function(){
|
|
11
|
+
// };
|
|
12
|
+
//
|
|
13
|
+
// /**
|
|
14
|
+
// @return {string} The cardinal number string.
|
|
15
|
+
// */
|
|
16
|
+
// $N.nth = function(n){
|
|
17
|
+
// };
|
|
18
|
+
//
|
|
19
|
+
// LOAD.file = function(){
|
|
20
|
+
// }
|
|
21
|
+
//
|
|
22
|
+
// /**#=-*/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@class
|
|
3
|
+
@inherits Bar#zop as #my_zop
|
|
4
|
+
*/
|
|
5
|
+
function Foo() {
|
|
6
|
+
/** this is a zip. */
|
|
7
|
+
this.zip = function() {}
|
|
8
|
+
|
|
9
|
+
/** from Bar */
|
|
10
|
+
this.my_zop = new Bar().zop;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
@class
|
|
15
|
+
@borrows Foo#zip as this.my_zip
|
|
16
|
+
*/
|
|
17
|
+
function Bar() {
|
|
18
|
+
/** this is a zop. */
|
|
19
|
+
this.zop = function() {}
|
|
20
|
+
|
|
21
|
+
/** from Foo */
|
|
22
|
+
this.my_zip = new Foo().zip;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** @namespace */
|
|
26
|
+
var myObject = {
|
|
27
|
+
/**
|
|
28
|
+
@type function
|
|
29
|
+
*/
|
|
30
|
+
myFunc: getFunction()
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Object} object
|
|
3
|
+
* @return {string}
|
|
4
|
+
*/
|
|
5
|
+
function valueOf(object) {}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @param {Object} object
|
|
9
|
+
* @return {string}
|
|
10
|
+
*/
|
|
11
|
+
function toString(object) {}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {Object} object
|
|
15
|
+
* @return {string}
|
|
16
|
+
*/
|
|
17
|
+
function toSource(object) {}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {Object} object
|
|
21
|
+
* @return {string}
|
|
22
|
+
*/
|
|
23
|
+
function constructor(object) {}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
== 2.4.0 ==
|
|
2
|
+
|
|
3
|
+
* Fixed bug that added mutiple symbols with the same name to docs.
|
|
4
|
+
* Added support for the -m option to suppress warnings for multiple docs.
|
|
5
|
+
* Added patch by brownsea42 to support quoted user variables on the command line. ( issue #281 )
|
|
6
|
+
* Fixed bug that sometimes caused links to events to be incorrect. ( issue #292 )
|
|
7
|
+
|
|
8
|
+
== 2.3.3 ==
|
|
9
|
+
|
|
10
|
+
* Fixed bug that made all fields declared with the @property tag static. ( issue #262 )
|
|
11
|
+
* Minor fix to better handle trailing slash on path to template (from jwmetrocat). ( issue #237 )
|
|
12
|
+
* Fix for @memberOf when applied to inner members. ( issue #264 )
|
|
13
|
+
* Fix for @memberOf when applied to symbols documented with @name. ( issue #260 )
|
|
14
|
+
* Applied patch from kunhualqk, fix for bug where @link to borrowed member did not resolve to parent class. ( issue #218 )
|
|
15
|
+
* Fix for @requires not linking back to the required class
|
|
16
|
+
* Added experimental support for @constructs to have an argument, the class name, when applied to a function assignment.
|
|
17
|
+
|
|
18
|
+
== 2.3.2 ==
|
|
19
|
+
|
|
20
|
+
* Minor update to the usage notes and corrected the version number displayed in the output.
|
|
21
|
+
|
|
22
|
+
== 2.3.1 ==
|
|
23
|
+
|
|
24
|
+
* Fixed HTML typo in allfiles template. ( issue #228 )
|
|
25
|
+
* Modified template to display version information for classes.
|
|
26
|
+
* Modified template to better support multiple methods with the same name.
|
|
27
|
+
* Fixed bug that caused template to error when backtick characters appeared around class names.
|
|
28
|
+
|
|
29
|
+
== 2.3.0 ==
|
|
30
|
+
|
|
31
|
+
* Added option -u, --unique to avoid bug that causes multiple symbols with names that differ only by case to overwrite each others output on case-insensitive filesystems. ( issue #162 )
|
|
32
|
+
* Fixed bug where {@links} in @deprecated tags did not resolve. ( issue #220 )
|
|
33
|
+
* Fixed bug that caused parens around a function to make it to be unrecognized. ( issue #213 )
|
|
34
|
+
* Fixed bug prevented explicit links to named anchors from working (thanks katgao.pku). ( issue #215 )
|
|
35
|
+
* Fixed bug that prevented full description from appearing in file overview. ( issue #224 )
|
|
36
|
+
|
|
37
|
+
== 2.2.1 ==
|
|
38
|
+
|
|
39
|
+
* Fixed bug with class template, where sorting of methods was accidentally removed (thanks dezfowler).
|
|
40
|
+
* Added missing test files for the @exports unit tests.
|
|
41
|
+
|
|
42
|
+
== 2.2.0 ==
|
|
43
|
+
|
|
44
|
+
* Fixed bug that caused exception when given a folder containing non-js files, even with the x commandline option set to "js". ( issue #193 )
|
|
45
|
+
* Fixed typo in index template [patch submitted by olle]. ( issue #198 )
|
|
46
|
+
* Modified @borrows tag experimentally to allow for missing "as ..." clause.
|
|
47
|
+
* Added support for the @exports tag, to allow one symbol to be documented as another.
|
|
48
|
+
* Added support for the -S option to document code following the Secure Modules pattern.
|
|
49
|
+
|
|
50
|
+
== 2.1.0 ==
|
|
51
|
+
|
|
52
|
+
* Added support for the @event tag.
|
|
53
|
+
* Fixed bug that prevented the : character from appearing in symbol names.
|
|
54
|
+
* Fixed bug that prevented underscored symbols marked with @public being tagged as private. (issue #184 )
|
|
55
|
+
* Fixed bug that randomly affected the @memberOf tag when the name of the symbol did not include the parent name.
|
|
56
|
+
* Fixed bug that prevented templates that were not in the jsdoc-toolkit folder from being found. ( issue #176 )
|
|
57
|
+
* Added ability to check for trailing slash on template path. ( issue #177 )
|
|
58
|
+
* Modified classDesc so that it no longer is appended with the constructor desc.
|
|
59
|
+
* Fixed call to plugin onDocCommentSrc.
|
|
60
|
+
* Added missing support for inline doc comments for function return types. ( issue #189 )
|
|
61
|
+
* Added command line option -q, --quiet.
|
|
62
|
+
* Added command line option -E, --exclude. ( issue #143 )
|
|
63
|
+
* Added 2 more hooks for plugins. ( issue #163 )
|
|
64
|
+
* Added support for extending built-ins. ( issue #160 )
|
|
65
|
+
* Added "compact" option to JSDOC.JsPlate.prototype.process. ( issue #159 )
|
|
66
|
+
* @augments no longer documents static members as inherited. ( issue #138 )
|
|
67
|
+
* @link to a class now goes to the page for that class, not the constructor. ( issue #178 )
|
|
68
|
+
* Warnings of mismatched curly brace now include filename. ( issue #166 )
|
|
69
|
+
* Fixed bug affecting template paths loaded via a configuration file when the trailing slash is missing. ( issue #191 )
|
|
70
|
+
* Minor optimizations.
|
|
71
|
+
|
|
72
|
+
== 2.0.2 ==
|
|
73
|
+
|
|
74
|
+
* Fixed bug that sometimes caused an example of division in the source code to be interpretted as a regex by the JsDoc Toolkit analyzer. ( issue #158 )
|
|
75
|
+
* Fixed a bug that prevented private variables marked as @public from appearing in the documentation. ( issue #161 )
|
|
76
|
+
* Fixed bug that prevented variable names with underscored properties from appearing in summaries. ( issue #173 )
|
|
77
|
+
|
|
78
|
+
== 2.0.1 ==
|
|
79
|
+
|
|
80
|
+
* Fixed bug that prevented @fileOverview tag from being recognized.
|
|
81
|
+
* Added support for @fieldOf as a synonym for @field plus @memberOf.
|
|
82
|
+
* Added support for @name tag in a @fileOverview comment to control the displayed name of the file.
|
|
83
|
+
* Added support for multiple @example tags. ( issue #152 )
|
|
84
|
+
* Modified style sheet of jsdoc template to make more readable. ( issue #151 )
|
|
85
|
+
* Fixed bug that prevented @since documentation from displaying correctly when it appeared in a class. ( issue #150 )
|
|
86
|
+
* Fixed bug that caused inhertited properties to sometimes not resolve correctly. ( issue #144 )
|
|
87
|
+
* Modified so that trailing whitespace in @example is always trimmed. ( issue #153 )
|
|
88
|
+
* Added support for elseif to JsPlate. (hat tip to fredck)
|
|
89
|
+
* Added support for @location urls in the @overview comment to the jsdoc template.
|
|
90
|
+
|
|
91
|
+
== Changes From Versions 1.4.0 to 2.0.0 ==
|
|
92
|
+
|
|
93
|
+
* Upgraded included version of Rhino from 1.6 to 1.7R1.
|
|
94
|
+
* Removed circular references in parsed documentation objects.
|
|
95
|
+
* Improved inheritance handling, now properties and events can be inherited same as methods.
|
|
96
|
+
* Improved handling of cross-file relationships, now having two related objects in separate files is not a problem.
|
|
97
|
+
* Improved ability to recognize membership of previously defined objects.
|
|
98
|
+
* Added ability to redefine parsing behavior with plugins.
|
|
99
|
+
* @methodOf is a synonym for @function and @memberOf.
|
|
100
|
+
* Added @default to document default values of members that are objects.
|
|
101
|
+
* Added ability to parse and refer to inner functions.
|
|
102
|
+
* Fixed bug that appeared when calling a method to set properties of the instance referred to by "this".
|
|
103
|
+
* Added ability to automatically create links to other symbols.
|
|
104
|
+
* New "jsdoc" template now produces fully W3C valid XHTML.
|
|
105
|
+
* Inline parameter type hint comments are now documented.
|
|
106
|
+
* Fixed error: Locally scoped variables (declared with var) no longer appear as global.
|
|
107
|
+
* It is now possible to run JsDoc Toolkit from any directory.
|
|
108
|
+
* Added support for inline {@link ...} tags.
|
|
109
|
+
* Added support for the -H command-line option to allow for custom content handlers.
|
|
110
|
+
* Tag names @inherits and @scope changed to @borrows and @lends.
|
|
111
|
+
? Combining @constructor in a doclet with @lends now supported.
|
|
112
|
+
* Multiple @lend tags now supported.
|
|
113
|
+
* Added support for the @constructs tag, used inside a @lends block.
|
|
114
|
+
* Added support for the @constant tag.
|
|
115
|
+
* Fixed bug that prevented the use of [] as a default value.
|
|
116
|
+
* Added support for the @field tag.
|
|
117
|
+
* Added support for the @public tag (applied to inner functions).
|
|
118
|
+
* @namespace tag can now be applied to functions, not just object literals.
|
|
119
|
+
* Added support for the -s command line option to suppress source code output.
|
|
120
|
+
* Added new unit test framework.
|
|
121
|
+
* Underscored symbols are now treated as if they have a @private tag by default.
|
|
122
|
+
* Improved support for anonymous constructors.
|
|
123
|
+
* Added support for the nocode meta tag.
|
|
124
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
This is an example of one way you could set up a configuration file to more
|
|
3
|
+
conveniently define some commandline options. You might like to do this if
|
|
4
|
+
you frequently reuse the same options. Note that you don't need to define
|
|
5
|
+
every option in this file, you can combine a configuration file with
|
|
6
|
+
additional options on the commandline if your wish.
|
|
7
|
+
|
|
8
|
+
You would include this configuration file by running JsDoc Toolkit like so:
|
|
9
|
+
java -jar jsrun.jar app/run.js -c=conf/sample.conf
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
{
|
|
14
|
+
// source files to use
|
|
15
|
+
_: ['app/test/jsdoc_test.js'],
|
|
16
|
+
|
|
17
|
+
// document all functions, even uncommented ones
|
|
18
|
+
a: true,
|
|
19
|
+
|
|
20
|
+
// including those marked @private
|
|
21
|
+
p: true,
|
|
22
|
+
|
|
23
|
+
// some extra variables I want to include
|
|
24
|
+
D: {generatedBy: "Michael Mathews", copyright: "2008"},
|
|
25
|
+
|
|
26
|
+
// use this directory as the output directory
|
|
27
|
+
d: "docs",
|
|
28
|
+
|
|
29
|
+
// use this template
|
|
30
|
+
t: "templates/jsdoc"
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<project>
|
|
2
|
+
<target name="clean">
|
|
3
|
+
<delete dir="build"/>
|
|
4
|
+
</target>
|
|
5
|
+
|
|
6
|
+
<target name="compile">
|
|
7
|
+
<mkdir dir="build/classes"/>
|
|
8
|
+
<javac
|
|
9
|
+
srcdir="src" destdir="build/classes"
|
|
10
|
+
classpath="./classes/js.jar"
|
|
11
|
+
/>
|
|
12
|
+
</target>
|
|
13
|
+
|
|
14
|
+
<target name="jar">
|
|
15
|
+
<mkdir dir="build/jar"/>
|
|
16
|
+
<jar destfile="build/jar/jsrun.jar" basedir="build/classes">
|
|
17
|
+
<manifest>
|
|
18
|
+
<attribute name="Main-Class" value="JsRun"/>
|
|
19
|
+
<attribute name="Class-Path" value="./java/classes/js.jar"/>
|
|
20
|
+
</manifest>
|
|
21
|
+
</jar>
|
|
22
|
+
</target>
|
|
23
|
+
|
|
24
|
+
<target name="debugjar">
|
|
25
|
+
<mkdir dir="build/jar"/>
|
|
26
|
+
<jar destfile="build/jar/jsdebug.jar" basedir="build/classes">
|
|
27
|
+
<manifest>
|
|
28
|
+
<attribute name="Main-Class" value="JsDebugRun"/>
|
|
29
|
+
<attribute name="Class-Path" value="./java/classes/js.jar"/>
|
|
30
|
+
</manifest>
|
|
31
|
+
</jar>
|
|
32
|
+
</target>
|
|
33
|
+
|
|
34
|
+
<target name="clean-build" depends="clean,compile,jar"/>
|
|
35
|
+
<target name="clean-debug" depends="clean,compile,debugjar"/>
|
|
36
|
+
</project>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<project default="clean-build"><!-- use this build script if you are stuck with ant version 1.4 -->
|
|
2
|
+
<target name="clean">
|
|
3
|
+
<delete dir="build"/>
|
|
4
|
+
</target>
|
|
5
|
+
|
|
6
|
+
<target name="compile">
|
|
7
|
+
<mkdir dir="build/classes"/>
|
|
8
|
+
<javac
|
|
9
|
+
srcdir="src" destdir="build/classes"
|
|
10
|
+
classpath="./classes/js.jar"
|
|
11
|
+
/>
|
|
12
|
+
</target>
|
|
13
|
+
|
|
14
|
+
<target name="jar">
|
|
15
|
+
<mkdir dir="build/jar"/>
|
|
16
|
+
<jar jarfile="build/jar/jsrun.jar" basedir="build/classes">
|
|
17
|
+
<manifest>
|
|
18
|
+
<attribute name="Main-Class" value="JsRun"/>
|
|
19
|
+
<attribute name="Class-Path" value="./java/classes/js.jar"/>
|
|
20
|
+
</manifest>
|
|
21
|
+
</jar>
|
|
22
|
+
</target>
|
|
23
|
+
|
|
24
|
+
<target name="debugjar">
|
|
25
|
+
<mkdir dir="build/jar"/>
|
|
26
|
+
<jar jarfile="build/jar/jsdebug.jar" basedir="build/classes">
|
|
27
|
+
<manifest>
|
|
28
|
+
<attribute name="Main-Class" value="JsDebugRun"/>
|
|
29
|
+
<attribute name="Class-Path" value="./java/classes/js.jar"/>
|
|
30
|
+
</manifest>
|
|
31
|
+
</jar>
|
|
32
|
+
</target>
|
|
33
|
+
|
|
34
|
+
<target name="clean-build" depends="clean,compile,jar"/>
|
|
35
|
+
<target name="clean-debug" depends="clean,compile,debugjar"/>
|
|
36
|
+
</project>
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A trivial bootstrap class that simply adds the path to the
|
|
3
|
+
* .js file as an argument to the Rhino call. This little hack
|
|
4
|
+
* allows the code in the .js file to have access to it's own
|
|
5
|
+
* path via the Rhino arguments object. This is necessary to
|
|
6
|
+
* allow the .js code to find resource files in a location
|
|
7
|
+
* relative to itself.
|
|
8
|
+
*
|
|
9
|
+
* USAGE: java -jar jsdebug.jar path/to/file.js
|
|
10
|
+
*/
|
|
11
|
+
public class JsDebugRun {
|
|
12
|
+
public static void main(String[] args) {
|
|
13
|
+
String[] jsargs = {"-j="+args[0]};
|
|
14
|
+
|
|
15
|
+
String[] allArgs = new String[jsargs.length + args.length];
|
|
16
|
+
System.arraycopy(args, 0, allArgs, 0, args.length);
|
|
17
|
+
System.arraycopy(jsargs, 0, allArgs, args.length ,jsargs.length);
|
|
18
|
+
|
|
19
|
+
org.mozilla.javascript.tools.debugger.Main.main(allArgs);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A trivial bootstrap class that simply adds the path to the
|
|
3
|
+
* .js file as an argument to the Rhino call. This little hack
|
|
4
|
+
* allows the code in the .js file to have access to it's own
|
|
5
|
+
* path via the Rhino arguments object. This is necessary to
|
|
6
|
+
* allow the .js code to find resource files in a location
|
|
7
|
+
* relative to itself.
|
|
8
|
+
*
|
|
9
|
+
* USAGE: java -jar jsrun.jar path/to/file.js
|
|
10
|
+
*/
|
|
11
|
+
public class JsRun {
|
|
12
|
+
public static void main(String[] args) {
|
|
13
|
+
String[] jsargs = {"-j="+args[0]};
|
|
14
|
+
|
|
15
|
+
String[] allArgs = new String[jsargs.length + args.length];
|
|
16
|
+
System.arraycopy(args, 0, allArgs, 0, args.length);
|
|
17
|
+
System.arraycopy(jsargs, 0, allArgs, args.length ,jsargs.length);
|
|
18
|
+
|
|
19
|
+
org.mozilla.javascript.tools.shell.Main.main(allArgs);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/bin/ksh
|
|
2
|
+
|
|
3
|
+
# launcher script for jsdoc
|
|
4
|
+
# Author: Avi Deitcher
|
|
5
|
+
#
|
|
6
|
+
# This program is released under the MIT License as follows:
|
|
7
|
+
|
|
8
|
+
# Copyright (c) 2008-2009 Atomic Inc <avi@jsorm.com>
|
|
9
|
+
#
|
|
10
|
+
#Permission is hereby granted, free of charge, to any person
|
|
11
|
+
#obtaining a copy of this software and associated documentation
|
|
12
|
+
#files (the "Software"), to deal in the Software without
|
|
13
|
+
#restriction, including without limitation the rights to use,
|
|
14
|
+
#copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
#copies of the Software, and to permit persons to whom the
|
|
16
|
+
#Software is furnished to do so, subject to the following
|
|
17
|
+
#conditions:
|
|
18
|
+
##
|
|
19
|
+
#The above copyright notice and this permission notice shall be
|
|
20
|
+
#included in all copies or substantial portions of the Software.
|
|
21
|
+
#
|
|
22
|
+
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
23
|
+
#EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
24
|
+
#OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
25
|
+
#NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
26
|
+
#HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
27
|
+
#WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
28
|
+
#FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
29
|
+
#OTHER DEALINGS IN THE SOFTWARE.
|
|
30
|
+
#
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if [[ -n "$JSDOCDIR" ]]; then
|
|
34
|
+
_DOCDIR="-Djsdoc.dir=$JSDOCDIR"
|
|
35
|
+
_APPDIR="$JSDOCDIR/app"
|
|
36
|
+
_BASEDIR="$JSDOCDIR"
|
|
37
|
+
else
|
|
38
|
+
_DOCDIR=""
|
|
39
|
+
_APPDIR="./app"
|
|
40
|
+
_BASEDIR="."
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
if [[ -n "$JSDOCTEMPLATEDIR" ]]; then
|
|
44
|
+
_TDIR="-Djsdoc.template.dir=$JSDOCTEMPLATEDIR"
|
|
45
|
+
else
|
|
46
|
+
_TDIR=""
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
CMD="java $_DOCDIR $_TDIR -jar $_BASEDIR/jsrun.jar $_APPDIR/run.js $@"
|
|
50
|
+
echo $CMD
|
|
51
|
+
$CMD
|
|
52
|
+
|