quentonc-jsdoc_helper 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. data/History.txt +13 -0
  2. data/README.rdoc +64 -0
  3. data/Rakefile +46 -0
  4. data/TODO.rdoc +5 -0
  5. data/bin/jsdoc_helper +8 -0
  6. data/ext/jsdoc-toolkit/README.txt +146 -0
  7. data/ext/jsdoc-toolkit/app/frame/Chain.js +102 -0
  8. data/ext/jsdoc-toolkit/app/frame/Dumper.js +144 -0
  9. data/ext/jsdoc-toolkit/app/frame/Hash.js +84 -0
  10. data/ext/jsdoc-toolkit/app/frame/Link.js +148 -0
  11. data/ext/jsdoc-toolkit/app/frame/Namespace.js +10 -0
  12. data/ext/jsdoc-toolkit/app/frame/Opt.js +134 -0
  13. data/ext/jsdoc-toolkit/app/frame/Reflection.js +26 -0
  14. data/ext/jsdoc-toolkit/app/frame/String.js +93 -0
  15. data/ext/jsdoc-toolkit/app/frame/Testrun.js +129 -0
  16. data/ext/jsdoc-toolkit/app/frame.js +33 -0
  17. data/ext/jsdoc-toolkit/app/handlers/FOODOC.js +26 -0
  18. data/ext/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +159 -0
  19. data/ext/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +16 -0
  20. data/ext/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +292 -0
  21. data/ext/jsdoc-toolkit/app/handlers/XMLDOC.js +26 -0
  22. data/ext/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +200 -0
  23. data/ext/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +294 -0
  24. data/ext/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +126 -0
  25. data/ext/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +109 -0
  26. data/ext/jsdoc-toolkit/app/lib/JSDOC/Lang.js +144 -0
  27. data/ext/jsdoc-toolkit/app/lib/JSDOC/Parser.js +107 -0
  28. data/ext/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +33 -0
  29. data/ext/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +643 -0
  30. data/ext/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +229 -0
  31. data/ext/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +41 -0
  32. data/ext/jsdoc-toolkit/app/lib/JSDOC/Token.js +18 -0
  33. data/ext/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +332 -0
  34. data/ext/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +133 -0
  35. data/ext/jsdoc-toolkit/app/lib/JSDOC/Util.js +32 -0
  36. data/ext/jsdoc-toolkit/app/lib/JSDOC/Walker.js +459 -0
  37. data/ext/jsdoc-toolkit/app/lib/JSDOC.js +101 -0
  38. data/ext/jsdoc-toolkit/app/main.js +111 -0
  39. data/ext/jsdoc-toolkit/app/plugins/commentSrcJson.js +20 -0
  40. data/ext/jsdoc-toolkit/app/plugins/frameworkPrototype.js +16 -0
  41. data/ext/jsdoc-toolkit/app/plugins/functionCall.js +10 -0
  42. data/ext/jsdoc-toolkit/app/plugins/publishSrcHilite.js +62 -0
  43. data/ext/jsdoc-toolkit/app/plugins/symbolLink.js +9 -0
  44. data/ext/jsdoc-toolkit/app/plugins/tagParamConfig.js +31 -0
  45. data/ext/jsdoc-toolkit/app/plugins/tagSynonyms.js +43 -0
  46. data/ext/jsdoc-toolkit/app/run.js +348 -0
  47. data/ext/jsdoc-toolkit/app/t/TestDoc.js +144 -0
  48. data/ext/jsdoc-toolkit/app/t/runner.js +13 -0
  49. data/ext/jsdoc-toolkit/app/test/addon.js +24 -0
  50. data/ext/jsdoc-toolkit/app/test/anon_inner.js +14 -0
  51. data/ext/jsdoc-toolkit/app/test/augments.js +31 -0
  52. data/ext/jsdoc-toolkit/app/test/augments2.js +26 -0
  53. data/ext/jsdoc-toolkit/app/test/borrows.js +41 -0
  54. data/ext/jsdoc-toolkit/app/test/borrows2.js +23 -0
  55. data/ext/jsdoc-toolkit/app/test/config.js +22 -0
  56. data/ext/jsdoc-toolkit/app/test/constructs.js +18 -0
  57. data/ext/jsdoc-toolkit/app/test/encoding.js +10 -0
  58. data/ext/jsdoc-toolkit/app/test/encoding_other.js +12 -0
  59. data/ext/jsdoc-toolkit/app/test/event.js +54 -0
  60. data/ext/jsdoc-toolkit/app/test/functions_anon.js +39 -0
  61. data/ext/jsdoc-toolkit/app/test/functions_nested.js +33 -0
  62. data/ext/jsdoc-toolkit/app/test/global.js +13 -0
  63. data/ext/jsdoc-toolkit/app/test/globals.js +25 -0
  64. data/ext/jsdoc-toolkit/app/test/ignore.js +10 -0
  65. data/ext/jsdoc-toolkit/app/test/inner.js +16 -0
  66. data/ext/jsdoc-toolkit/app/test/jsdoc_test.js +477 -0
  67. data/ext/jsdoc-toolkit/app/test/lend.js +33 -0
  68. data/ext/jsdoc-toolkit/app/test/memberof.js +19 -0
  69. data/ext/jsdoc-toolkit/app/test/memberof_constructor.js +17 -0
  70. data/ext/jsdoc-toolkit/app/test/name.js +19 -0
  71. data/ext/jsdoc-toolkit/app/test/namespace_nested.js +23 -0
  72. data/ext/jsdoc-toolkit/app/test/nocode.js +13 -0
  73. data/ext/jsdoc-toolkit/app/test/oblit_anon.js +20 -0
  74. data/ext/jsdoc-toolkit/app/test/overview.js +20 -0
  75. data/ext/jsdoc-toolkit/app/test/param_inline.js +37 -0
  76. data/ext/jsdoc-toolkit/app/test/params_optional.js +8 -0
  77. data/ext/jsdoc-toolkit/app/test/prototype.js +17 -0
  78. data/ext/jsdoc-toolkit/app/test/prototype_nested.js +9 -0
  79. data/ext/jsdoc-toolkit/app/test/prototype_oblit.js +13 -0
  80. data/ext/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +24 -0
  81. data/ext/jsdoc-toolkit/app/test/public.js +10 -0
  82. data/ext/jsdoc-toolkit/app/test/shared.js +42 -0
  83. data/ext/jsdoc-toolkit/app/test/shared2.js +2 -0
  84. data/ext/jsdoc-toolkit/app/test/shortcuts.js +22 -0
  85. data/ext/jsdoc-toolkit/app/test/static_this.js +13 -0
  86. data/ext/jsdoc-toolkit/app/test/synonyms.js +31 -0
  87. data/ext/jsdoc-toolkit/app/test/tosource.js +23 -0
  88. data/ext/jsdoc-toolkit/app/test/variable_redefine.js +14 -0
  89. data/ext/jsdoc-toolkit/app/test.js +307 -0
  90. data/ext/jsdoc-toolkit/changes.txt +75 -0
  91. data/ext/jsdoc-toolkit/conf/sample.conf +31 -0
  92. data/ext/jsdoc-toolkit/java/build.xml +36 -0
  93. data/ext/jsdoc-toolkit/java/build_1.4.xml +36 -0
  94. data/ext/jsdoc-toolkit/java/classes/js.jar +0 -0
  95. data/ext/jsdoc-toolkit/java/src/JsDebugRun.java +21 -0
  96. data/ext/jsdoc-toolkit/java/src/JsRun.java +21 -0
  97. data/ext/jsdoc-toolkit/jsdebug.jar +0 -0
  98. data/ext/jsdoc-toolkit/jsrun.jar +0 -0
  99. data/ext/jsdoc-toolkit/out/jsdoc/files.html +216 -0
  100. data/ext/jsdoc-toolkit/out/jsdoc/index.html +210 -0
  101. data/ext/jsdoc-toolkit/out/jsdoc/symbols/_global_.html +306 -0
  102. data/ext/jsdoc-toolkit/out/jsdoc/symbols/src/lib_test.js.html +13 -0
  103. data/ext/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +17 -0
  104. data/ext/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +56 -0
  105. data/ext/jsdoc-toolkit/templates/jsdoc/class.tmpl +646 -0
  106. data/ext/jsdoc-toolkit/templates/jsdoc/index.tmpl +39 -0
  107. data/ext/jsdoc-toolkit/templates/jsdoc/publish.js +184 -0
  108. data/ext/jsdoc-toolkit/templates/jsdoc/static/default.css +162 -0
  109. data/ext/jsdoc-toolkit/templates/jsdoc/static/header.html +2 -0
  110. data/ext/jsdoc-toolkit/templates/jsdoc/static/index.html +19 -0
  111. data/ext/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +35 -0
  112. data/features/doing_rake_jsdoc.feature +74 -0
  113. data/features/step_definitions/jsdoc_helper_steps.rb +48 -0
  114. data/features/support/env.rb +11 -0
  115. data/features/support/file_helper.rb +68 -0
  116. data/features/writing_the_rakefile.feature +36 -0
  117. data/jsdoc_helper.gemspec +41 -0
  118. data/lib/jsdoc_helper/rake/task/runner.rb +85 -0
  119. data/lib/jsdoc_helper/rake/task.rb +43 -0
  120. data/lib/jsdoc_helper.rb +50 -0
  121. data/spec/jsdoc_helper/jsdoc_helper_spec.rb +4 -0
  122. data/spec/jsdoc_helper/rake/task/runner_spec.rb +45 -0
  123. data/spec/jsdoc_helper/support/file_helper_spec.rb +93 -0
  124. data/spec/spec_helper.rb +25 -0
  125. data/test/ext/jsdoc-toolkit/README.txt +146 -0
  126. data/test/ext/jsdoc-toolkit/app/frame/Chain.js +102 -0
  127. data/test/ext/jsdoc-toolkit/app/frame/Dumper.js +144 -0
  128. data/test/ext/jsdoc-toolkit/app/frame/Hash.js +84 -0
  129. data/test/ext/jsdoc-toolkit/app/frame/Link.js +148 -0
  130. data/test/ext/jsdoc-toolkit/app/frame/Namespace.js +10 -0
  131. data/test/ext/jsdoc-toolkit/app/frame/Opt.js +134 -0
  132. data/test/ext/jsdoc-toolkit/app/frame/Reflection.js +26 -0
  133. data/test/ext/jsdoc-toolkit/app/frame/String.js +93 -0
  134. data/test/ext/jsdoc-toolkit/app/frame/Testrun.js +129 -0
  135. data/test/ext/jsdoc-toolkit/app/frame.js +33 -0
  136. data/test/ext/jsdoc-toolkit/app/handlers/FOODOC.js +26 -0
  137. data/test/ext/jsdoc-toolkit/app/handlers/XMLDOC/DomReader.js +159 -0
  138. data/test/ext/jsdoc-toolkit/app/handlers/XMLDOC/XMLDoc.js +16 -0
  139. data/test/ext/jsdoc-toolkit/app/handlers/XMLDOC/XMLParse.js +292 -0
  140. data/test/ext/jsdoc-toolkit/app/handlers/XMLDOC.js +26 -0
  141. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/DocComment.js +200 -0
  142. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/DocTag.js +294 -0
  143. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/JsDoc.js +126 -0
  144. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/JsPlate.js +109 -0
  145. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/Lang.js +144 -0
  146. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/Parser.js +107 -0
  147. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/PluginManager.js +33 -0
  148. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/Symbol.js +643 -0
  149. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/SymbolSet.js +229 -0
  150. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/TextStream.js +41 -0
  151. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/Token.js +18 -0
  152. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/TokenReader.js +332 -0
  153. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/TokenStream.js +133 -0
  154. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/Util.js +32 -0
  155. data/test/ext/jsdoc-toolkit/app/lib/JSDOC/Walker.js +459 -0
  156. data/test/ext/jsdoc-toolkit/app/lib/JSDOC.js +101 -0
  157. data/test/ext/jsdoc-toolkit/app/main.js +111 -0
  158. data/test/ext/jsdoc-toolkit/app/plugins/commentSrcJson.js +20 -0
  159. data/test/ext/jsdoc-toolkit/app/plugins/frameworkPrototype.js +16 -0
  160. data/test/ext/jsdoc-toolkit/app/plugins/functionCall.js +10 -0
  161. data/test/ext/jsdoc-toolkit/app/plugins/publishSrcHilite.js +62 -0
  162. data/test/ext/jsdoc-toolkit/app/plugins/symbolLink.js +9 -0
  163. data/test/ext/jsdoc-toolkit/app/plugins/tagParamConfig.js +31 -0
  164. data/test/ext/jsdoc-toolkit/app/plugins/tagSynonyms.js +43 -0
  165. data/test/ext/jsdoc-toolkit/app/run.js +348 -0
  166. data/test/ext/jsdoc-toolkit/app/t/TestDoc.js +144 -0
  167. data/test/ext/jsdoc-toolkit/app/t/runner.js +13 -0
  168. data/test/ext/jsdoc-toolkit/app/test/addon.js +24 -0
  169. data/test/ext/jsdoc-toolkit/app/test/anon_inner.js +14 -0
  170. data/test/ext/jsdoc-toolkit/app/test/augments.js +31 -0
  171. data/test/ext/jsdoc-toolkit/app/test/augments2.js +26 -0
  172. data/test/ext/jsdoc-toolkit/app/test/borrows.js +41 -0
  173. data/test/ext/jsdoc-toolkit/app/test/borrows2.js +23 -0
  174. data/test/ext/jsdoc-toolkit/app/test/config.js +22 -0
  175. data/test/ext/jsdoc-toolkit/app/test/constructs.js +18 -0
  176. data/test/ext/jsdoc-toolkit/app/test/encoding.js +10 -0
  177. data/test/ext/jsdoc-toolkit/app/test/encoding_other.js +12 -0
  178. data/test/ext/jsdoc-toolkit/app/test/event.js +54 -0
  179. data/test/ext/jsdoc-toolkit/app/test/functions_anon.js +39 -0
  180. data/test/ext/jsdoc-toolkit/app/test/functions_nested.js +33 -0
  181. data/test/ext/jsdoc-toolkit/app/test/global.js +13 -0
  182. data/test/ext/jsdoc-toolkit/app/test/globals.js +25 -0
  183. data/test/ext/jsdoc-toolkit/app/test/ignore.js +10 -0
  184. data/test/ext/jsdoc-toolkit/app/test/inner.js +16 -0
  185. data/test/ext/jsdoc-toolkit/app/test/jsdoc_test.js +477 -0
  186. data/test/ext/jsdoc-toolkit/app/test/lend.js +33 -0
  187. data/test/ext/jsdoc-toolkit/app/test/memberof.js +19 -0
  188. data/test/ext/jsdoc-toolkit/app/test/memberof_constructor.js +17 -0
  189. data/test/ext/jsdoc-toolkit/app/test/name.js +19 -0
  190. data/test/ext/jsdoc-toolkit/app/test/namespace_nested.js +23 -0
  191. data/test/ext/jsdoc-toolkit/app/test/nocode.js +13 -0
  192. data/test/ext/jsdoc-toolkit/app/test/oblit_anon.js +20 -0
  193. data/test/ext/jsdoc-toolkit/app/test/overview.js +20 -0
  194. data/test/ext/jsdoc-toolkit/app/test/param_inline.js +37 -0
  195. data/test/ext/jsdoc-toolkit/app/test/params_optional.js +8 -0
  196. data/test/ext/jsdoc-toolkit/app/test/prototype.js +17 -0
  197. data/test/ext/jsdoc-toolkit/app/test/prototype_nested.js +9 -0
  198. data/test/ext/jsdoc-toolkit/app/test/prototype_oblit.js +13 -0
  199. data/test/ext/jsdoc-toolkit/app/test/prototype_oblit_constructor.js +24 -0
  200. data/test/ext/jsdoc-toolkit/app/test/public.js +10 -0
  201. data/test/ext/jsdoc-toolkit/app/test/shared.js +42 -0
  202. data/test/ext/jsdoc-toolkit/app/test/shared2.js +2 -0
  203. data/test/ext/jsdoc-toolkit/app/test/shortcuts.js +22 -0
  204. data/test/ext/jsdoc-toolkit/app/test/static_this.js +13 -0
  205. data/test/ext/jsdoc-toolkit/app/test/synonyms.js +31 -0
  206. data/test/ext/jsdoc-toolkit/app/test/tosource.js +23 -0
  207. data/test/ext/jsdoc-toolkit/app/test/variable_redefine.js +14 -0
  208. data/test/ext/jsdoc-toolkit/app/test.js +307 -0
  209. data/test/ext/jsdoc-toolkit/changes.txt +75 -0
  210. data/test/ext/jsdoc-toolkit/conf/sample.conf +31 -0
  211. data/test/ext/jsdoc-toolkit/java/build.xml +36 -0
  212. data/test/ext/jsdoc-toolkit/java/build_1.4.xml +36 -0
  213. data/test/ext/jsdoc-toolkit/java/classes/js.jar +0 -0
  214. data/test/ext/jsdoc-toolkit/java/src/JsDebugRun.java +21 -0
  215. data/test/ext/jsdoc-toolkit/java/src/JsRun.java +21 -0
  216. data/test/ext/jsdoc-toolkit/jsdebug.jar +0 -0
  217. data/test/ext/jsdoc-toolkit/jsrun.jar +0 -0
  218. data/test/ext/jsdoc-toolkit/templates/jsdoc/allclasses.tmpl +17 -0
  219. data/test/ext/jsdoc-toolkit/templates/jsdoc/allfiles.tmpl +56 -0
  220. data/test/ext/jsdoc-toolkit/templates/jsdoc/class.tmpl +646 -0
  221. data/test/ext/jsdoc-toolkit/templates/jsdoc/index.tmpl +39 -0
  222. data/test/ext/jsdoc-toolkit/templates/jsdoc/publish.js +184 -0
  223. data/test/ext/jsdoc-toolkit/templates/jsdoc/static/default.css +162 -0
  224. data/test/ext/jsdoc-toolkit/templates/jsdoc/static/header.html +2 -0
  225. data/test/ext/jsdoc-toolkit/templates/jsdoc/static/index.html +19 -0
  226. data/test/ext/jsdoc-toolkit/templates/jsdoc/symbol.tmpl +35 -0
  227. data/test/lib/test1.js +0 -0
  228. data/test/lib/test2.js +0 -0
  229. metadata +294 -0
@@ -0,0 +1,307 @@
1
+ load("app/frame/Dumper.js");
2
+ function symbolize(opt) {
3
+ symbols = null;
4
+ JSDOC.JsDoc(opt);
5
+ symbols = JSDOC.JsDoc.symbolSet;
6
+ }
7
+
8
+ var testCases = [
9
+ function() {
10
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/overview.js"]});
11
+ //print(Dumper.dump(symbols));
12
+ is('symbols.getSymbolByName("My Cool Library").name', 'My Cool Library', 'File overview can be found by alias.');
13
+ }
14
+ ,
15
+ function() {
16
+ symbolize({_: [SYS.pwd+"test/name.js"]});
17
+
18
+ is('symbols.getSymbol("Response").name', "Response", 'Virtual class name is found.');
19
+ is('symbols.getSymbol("Response#text").alias', "Response#text", 'Virtual method name is found.');
20
+ is('symbols.getSymbol("Response#text").memberOf', "Response", 'Virtual method parent name is found.');
21
+ }
22
+ ,
23
+ function() {
24
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/prototype.js"]});
25
+
26
+ is('symbols.getSymbol("Article").name', "Article", 'Function set to constructor prototype with inner constructor name is found.');
27
+ is('symbols.getSymbol("Article").hasMethod("init")', true, 'The initializer method name of prototype function is correct.');
28
+ is('symbols.getSymbol("Article").hasMember("counter")', true, 'A static property set in the prototype definition is found.');
29
+ is('symbols.getSymbol("Article").hasMember("title")', true, 'An instance property set in the prototype is found.');
30
+ is('symbols.getSymbol("Article#title").isStatic', false, 'An instance property has isStatic set to false.');
31
+ is('symbols.getSymbol("Article.counter").name', "counter", 'A static property set in the initializer has the name set correctly.');
32
+ is('symbols.getSymbol("Article.counter").memberOf', "Article", 'A static property set in the initializer has the memberOf set correctly.');
33
+ is('symbols.getSymbol("Article.counter").isStatic', true, 'A static property set in the initializer has isStatic set to true.');
34
+ }
35
+ ,
36
+ function() {
37
+ symbolize({a:true, _: [SYS.pwd+"test/prototype_oblit.js"]});
38
+
39
+ is('symbols.getSymbol("Article").name', "Article", 'Oblit set to constructor prototype name is found.');
40
+ is('typeof symbols.getSymbol("Article.prototype")', "undefined", 'The prototype oblit is not a symbol.');
41
+ is('symbols.getSymbol("Article#getTitle").name', "getTitle", 'The nonstatic method name of prototype oblit is correct.');
42
+ is('symbols.getSymbol("Article#getTitle").alias', "Article#getTitle", 'The alias of non-static method of prototype oblit is correct.');
43
+ is('symbols.getSymbol("Article#getTitle").isStatic', false, 'The isStatic of a nonstatic method of prototype oblit is correct.');
44
+ is('symbols.getSymbol("Article.getTitle").name', "getTitle", 'The static method name of prototype oblit is correct.');
45
+ is('symbols.getSymbol("Article.getTitle").isStatic', true, 'The isStatic of a static method of prototype oblit is correct.');
46
+ is('symbols.getSymbol("Article#getTitle").isa', "FUNCTION", 'The isa of non-static method of prototype oblit is correct.');
47
+ is('symbols.getSymbol("Article.getTitle").alias', "Article.getTitle", 'The alias of a static method of prototype oblit is correct.');
48
+ is('symbols.getSymbol("Article.getTitle").isa', "FUNCTION", 'The isa of static method of prototype oblit is correct.');
49
+ }
50
+ ,
51
+ function() {
52
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/prototype_oblit_constructor.js"]});
53
+
54
+ is('symbols.getSymbol("Article").name', "Article", 'Oblit set to constructor prototype with inner constructor name is found.');
55
+ is('symbols.getSymbol("Article#init").name', "init", 'The initializer method name of prototype oblit is correct.');
56
+ is('symbols.getSymbol("Article").hasMember("pages")', true, 'Property set by initializer method "this" is on the outer constructor.');
57
+ is('symbols.getSymbol("Article#Title").name', "Title", 'Name of the inner constructor name is found.');
58
+ is('symbols.getSymbol("Article#Title").memberOf', "Article", 'The memberOf of the inner constructor name is found.');
59
+ is('symbols.getSymbol("Article#Title").isa', "CONSTRUCTOR", 'The isa of the inner constructor name is constructor.');
60
+ is('symbols.getSymbol("Article#Title").hasMember("title")', true, 'A property set on the inner constructor "this" is on the inner constructor.');
61
+ }
62
+ ,
63
+ function() {
64
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/inner.js"]});
65
+
66
+ is('symbols.getSymbol("Outer").name', "Outer", 'Outer constructor prototype name is found.');
67
+ is('symbols.getSymbol("Outer").methods.length', 1, 'Inner function doesnt appear as a method of the outer.');
68
+ is('symbols.getSymbol("Outer").hasMethod("open")', true, 'Outer constructors methods arent affected by inner function.');
69
+ is('symbols.getSymbol("Outer-Inner").alias', "Outer-Inner", 'Alias of inner function is found.');
70
+ is('symbols.getSymbol("Outer-Inner").isa', "CONSTRUCTOR", 'isa of inner function constructor is found.');
71
+ is('symbols.getSymbol("Outer-Inner").memberOf', "Outer", 'The memberOf of inner function is found.');
72
+ is('symbols.getSymbol("Outer-Inner").name', "Inner", 'The name of inner function is found.');
73
+ is('symbols.getSymbol("Outer-Inner#name").name', "name", 'A member of the inner function constructor, attached to "this" is found on inner.');
74
+ is('symbols.getSymbol("Outer-Inner#name").memberOf', "Outer-Inner", 'The memberOf of an inner function member is found.');
75
+ }
76
+ ,
77
+ function() {
78
+ symbolize({a:true, _: [SYS.pwd+"test/prototype_nested.js"]});
79
+
80
+ is('symbols.getSymbol("Word").name', "Word", 'Base constructor name is found.');
81
+ is('symbols.getSymbol("Word").hasMethod("reverse")', true, 'Base constructor method is found.');
82
+ is('symbols.getSymbol("Word").methods.length', 1, 'Base constructor has only one method.');
83
+ is('symbols.getSymbol("Word").memberOf', "", 'Base constructor memberOf is empty.');
84
+ is('symbols.getSymbol("Word#reverse").name', "reverse", 'Member of constructor prototype name is found.');
85
+ is('symbols.getSymbol("Word#reverse").memberOf', "Word", 'Member of constructor prototype memberOf is found.');
86
+ is('symbols.getSymbol("Word#reverse.utf8").name', "utf8", 'Member of constructor prototype method name is found.');
87
+ is('symbols.getSymbol("Word#reverse.utf8").memberOf', "Word#reverse", 'Static nested member memberOf is found.');
88
+ }
89
+ ,
90
+ function() {
91
+ symbolize({a:true, _: [SYS.pwd+"test/namespace_nested.js"]});
92
+
93
+ is('symbols.getSymbol("ns1").name', "ns1", 'Base namespace name is found.');
94
+ is('symbols.getSymbol("ns1").memberOf', "", 'Base namespace memberOf is empty (its a constructor).');
95
+ is('symbols.getSymbol("ns1.ns2").name', "ns2", 'Nested namespace name is found.');
96
+ is('symbols.getSymbol("ns1.ns2").alias', "ns1.ns2", 'Nested namespace alias is found.');
97
+ is('symbols.getSymbol("ns1.ns2").memberOf', "ns1", 'Nested namespace memberOf is found.');
98
+ is('symbols.getSymbol("ns1.ns2.Function1").name', "Function1", 'Method of nested namespace name is found.');
99
+ is('symbols.getSymbol("ns1.ns2.Function1").memberOf', "ns1.ns2", 'Constructor of nested namespace memberOf is found.');
100
+ }
101
+ ,
102
+ function() {
103
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/functions_nested.js"]});
104
+
105
+ is('symbols.getSymbol("Zop").name', "Zop", 'Any constructor name is found.');
106
+ is('symbols.getSymbol("Zop").isa', "CONSTRUCTOR", 'It isa constructor.');
107
+ is('symbols.getSymbol("Zop").hasMethod("zap")', true, 'Its method name, set later, is in methods array.');
108
+ is('symbols.getSymbol("Foo").name', "Foo", 'The containing constructor name is found.');
109
+ is('symbols.getSymbol("Foo").hasMethod("methodOne")', true, 'Its method name is found.');
110
+ is('symbols.getSymbol("Foo").hasMethod("methodTwo")', true, 'Its second method name is found.');
111
+ is('symbols.getSymbol("Foo#methodOne").alias', "Foo#methodOne", 'A methods alias is found.');
112
+ is('symbols.getSymbol("Foo#methodOne").isStatic', false, 'A methods is not static.');
113
+ is('symbols.getSymbol("Bar").name', "Bar", 'A global function declared inside another function is found.');
114
+ is('symbols.getSymbol("Bar").isa', "FUNCTION", 'It isa function.');
115
+ is('symbols.getSymbol("Bar").memberOf', "_global_", 'It is global.');
116
+ is('symbols.getSymbol("Foo-inner").name', "inner", 'An inner functions name is found.');
117
+ is('symbols.getSymbol("Foo-inner").memberOf', "Foo", 'It is member of the outer function.');
118
+ is('symbols.getSymbol("Foo-inner").isInner', true, 'It is an inner function.');
119
+ }
120
+ ,
121
+ function() {
122
+ symbolize({a:true, _: [SYS.pwd+"test/memberof_constructor.js"]});
123
+
124
+ is('symbols.getSymbol("Circle#Tangent").name', "Tangent", 'Constructor set on prototype using @member has correct name.');
125
+ is('symbols.getSymbol("Circle#Tangent").memberOf', "Circle", 'Constructor set on prototype using @member has correct memberOf.');
126
+ is('symbols.getSymbol("Circle#Tangent").alias', "Circle#Tangent", 'Constructor set on prototype using @member has correct alias.');
127
+ is('symbols.getSymbol("Circle#Tangent").isa', "CONSTRUCTOR", 'Constructor set on prototype using @member has correct isa.');
128
+ is('symbols.getSymbol("Circle#Tangent").isStatic', false, 'Constructor set on prototype using @member is not static.');
129
+ is('symbols.getSymbol("Circle#Tangent#getDiameter").name', "getDiameter", 'Method set on prototype using @member has correct name.');
130
+ is('symbols.getSymbol("Circle#Tangent#getDiameter").memberOf', "Circle#Tangent", 'Method set on prototype using @member has correct memberOf.');
131
+ is('symbols.getSymbol("Circle#Tangent#getDiameter").alias', "Circle#Tangent#getDiameter", 'Method set on prototype using @member has correct alias.');
132
+ is('symbols.getSymbol("Circle#Tangent#getDiameter").isa', "FUNCTION", 'Method set on prototype using @member has correct isa.');
133
+ is('symbols.getSymbol("Circle#Tangent#getDiameter").isStatic', false, 'Method set on prototype using @member is not static.');
134
+ }
135
+ ,
136
+ function() {
137
+ symbolize({a:true, p: true, _: [SYS.pwd+"test/memberof.js"]});
138
+
139
+ is('symbols.getSymbol("pack.install").alias', "pack.install", 'Using @memberOf sets alias, when parent name is in memberOf tag.');
140
+ is('symbols.getSymbol("pack.install.overwrite").name', "install.overwrite", 'Using @memberOf sets name, even if the name is dotted.');
141
+ is('symbols.getSymbol("pack.install.overwrite").memberOf', "pack", 'Using @memberOf sets memberOf.');
142
+ is('symbols.getSymbol("pack.install.overwrite").isStatic', true, 'Using @memberOf with value not ending in octothorp sets isStatic to true.');
143
+ }
144
+ ,
145
+ function() {
146
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/borrows.js"]});
147
+
148
+ is('symbols.getSymbol("Layout").name', "Layout", 'Constructor can be found.');
149
+ is('symbols.getSymbol("Layout").hasMethod("init")', true, 'Constructor method name can be found.');
150
+ is('symbols.getSymbol("Layout").hasMember("orientation")', true, 'Constructor property name can be found.');
151
+
152
+ is('symbols.getSymbol("Page").hasMethod("reset")', true, 'Second constructor method name can be found.');
153
+ is('symbols.getSymbol("Page").hasMember("orientation")', true, 'Second constructor borrowed property name can be found in properties.');
154
+ is('symbols.getSymbol("Page#orientation").memberOf', "Page", 'Second constructor borrowed property memberOf can be found.');
155
+ is('symbols.getSymbol("Page").hasMethod("myGetInnerElements")', true, 'Can borrow an inner function, add it as a static function.');
156
+
157
+ is('symbols.getSymbol("ThreeColumnPage#init").alias', "ThreeColumnPage#init", 'Third constructor method can be found even though method with same name is borrowed.');
158
+ is('symbols.getSymbol("ThreeColumnPage#reset").alias', "ThreeColumnPage#reset", 'Borrowed method can be found.');
159
+ is('symbols.getSymbol("ThreeColumnPage#orientation").alias', "ThreeColumnPage#orientation", 'Twice borrowed method can be found.');
160
+
161
+ }
162
+ ,
163
+ function() {
164
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/borrows2.js"]});
165
+
166
+ is('symbols.getSymbol("Foo").hasMethod("my_zop")', true, 'Borrowed method can be found.');
167
+ is('symbols.getSymbol("Bar").hasMethod("my_zip")', true, 'Second borrowed method can be found.');
168
+ }
169
+ ,
170
+ function() {
171
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/constructs.js"]});
172
+
173
+ is('symbols.getSymbol("Person").hasMethod("say")', true, 'The constructs tag creates a class that lends can add a method to.');
174
+ }
175
+ ,
176
+ function() {
177
+ symbolize({a: true, _: [SYS.pwd+"test/augments.js", SYS.pwd+"test/augments2.js"]});
178
+
179
+ is('symbols.getSymbol("Page").augments[0]', "Layout", 'An augmented class can be found.');
180
+ is('symbols.getSymbol("Page#reset").alias', "Page#reset", 'Method of augmenter can be found.');
181
+ is('symbols.getSymbol("Page").hasMethod("Layout#init")', true, 'Method from augmented can be found.');
182
+ is('symbols.getSymbol("Page").hasMember("Layout#orientation")', true, 'Property from augmented can be found.');
183
+ is('symbols.getSymbol("Page").methods.length', 3, 'Methods of augmented class are included in methods array.');
184
+
185
+ is('symbols.getSymbol("ThreeColumnPage").augments[0]', "Page", 'The extends tag is a synonym for augments.');
186
+ is('symbols.getSymbol("ThreeColumnPage").hasMethod("ThreeColumnPage#init")', true, 'Local method overrides augmented method of same name.');
187
+ is('symbols.getSymbol("ThreeColumnPage").methods.length', 3, 'Local method count is right.');
188
+
189
+ is('symbols.getSymbol("NewsletterPage").augments[0]', "ThreeColumnPage", 'Can augment across file boundaries.');
190
+ is('symbols.getSymbol("NewsletterPage").augments.length', 2, 'Multiple augments are supported.');
191
+ is('symbols.getSymbol("NewsletterPage").inherits[0].alias', "Junkmail#annoy", 'Inherited method with augments.');
192
+ is('symbols.getSymbol("NewsletterPage").methods.length', 6, 'Methods of augmented class are included in methods array across files.');
193
+ is('symbols.getSymbol("NewsletterPage").properties.length', 1, 'Properties of augmented class are included in properties array across files.');
194
+ }
195
+ ,
196
+ function() {
197
+ symbolize({a:true, _: [SYS.pwd+"test/static_this.js"]});
198
+
199
+ is('symbols.getSymbol("box.holder").name', "holder", 'Static namespace name can be found.');
200
+ is('symbols.getSymbol("box.holder.foo").name', "foo", 'Static namespace method name can be found.');
201
+ is('symbols.getSymbol("box.holder").isStatic', true, 'Static namespace method is static.');
202
+
203
+ is('symbols.getSymbol("box.holder.counter").name', "counter", 'Instance namespace property name set on "this" can be found.');
204
+ is('symbols.getSymbol("box.holder.counter").alias', "box.holder.counter", 'Instance namespace property alias set on "this" can be found.');
205
+ is('symbols.getSymbol("box.holder.counter").memberOf', "box.holder", 'Static namespace property memberOf set on "this" can be found.');
206
+ }
207
+ ,
208
+ function() {
209
+ symbolize({a:true, p: true, _: [SYS.pwd+"test/lend.js"]});
210
+
211
+ is('symbols.getSymbol("Person").name', "Person", 'Class defined in lend comment is found.');
212
+ is('symbols.getSymbol("Person").hasMethod("initialize")', true, 'Lent instance method name can be found.');
213
+ is('symbols.getSymbol("Person").hasMethod("say")', true, 'Second instance method can be found.');
214
+ is('symbols.getSymbol("Person#sing").isStatic', false, 'Instance method is known to be not static.');
215
+
216
+ is('symbols.getSymbol("Person.getCount").name', "getCount", 'Static method name from second lend comment can be found.');
217
+ is('symbols.getSymbol("Person.getCount").isStatic', true, 'Static method from second lend comment is known to be static.');
218
+
219
+ is('LOG.warnings.filter(function($){if($.indexOf("notok") > -1) return $}).length', 1, 'A warning is emitted when lending to an undocumented parent.');
220
+ }
221
+ ,
222
+ function() {
223
+ symbolize({a:true, _: [SYS.pwd+"test/param_inline.js"]});
224
+
225
+ is('symbols.getSymbol("Layout").params[0].type', "int", 'Inline param name is set.');
226
+ is('symbols.getSymbol("Layout").params[0].desc', "The number of columns.", 'Inline param desc is set from comment.');
227
+ is('symbols.getSymbol("Layout#getElement").params[0].name', "id", 'User defined param documentation takes precedence over parser defined.');
228
+ is('symbols.getSymbol("Layout#getElement").params[0].isOptional', true, 'Default for param is to not be optional.');
229
+ is('symbols.getSymbol("Layout#getElement").params[1].isOptional', false, 'Can mark a param as being optional.');
230
+ is('symbols.getSymbol("Layout#getElement").params[1].type', "number|string", 'Type of inline param doc can have multiple values.');
231
+ is('symbols.getSymbol("Layout#Canvas").params[0].type', "", 'Type can be not defined for some params.');
232
+ is('symbols.getSymbol("Layout#Canvas").params[2].type', "int", 'Type can be defined inline for only some params.');
233
+ is('symbols.getSymbol("Layout#rotate").params.length', 0, 'Docomments inside function sig is ignored without a param.');
234
+ is('symbols.getSymbol("Layout#init").params[2].type', "zoppler", 'Doc comment type overrides inline type for param with same name.');
235
+ }
236
+ ,
237
+ function() {
238
+ symbolize({a: true, _: [SYS.pwd+"test/shared.js", SYS.pwd+"test/shared2.js"]});
239
+
240
+ is('symbols.getSymbol("Array#some").name', 'some', 'The name of a symbol in a shared section is found.');
241
+ is('symbols.getSymbol("Array#some").alias', 'Array#some', 'The alias of a symbol in a shared section is found.');
242
+ is('symbols.getSymbol("Array#some").desc', "Extension to builtin array.", 'A description can be shared.');
243
+ is('symbols.getSymbol("Array#filter").desc', "Extension to builtin array.\nChange every element of an array.", 'A shared description is appended.');
244
+ is('symbols.getSymbol("Queue").desc', "A first in, first out data structure.", 'A description is not shared when outside a shared section.');
245
+ is('symbols.getSymbol("Queue.rewind").alias', "Queue.rewind", 'Second shared tag can be started.');
246
+ is('symbols.getSymbol("startOver").alias', "startOver", 'Shared tag doesnt cross over files.');
247
+ }
248
+ ,
249
+ function() {
250
+ symbolize({a: true, _: [SYS.pwd+"test/config.js"]});
251
+ is('symbols.getSymbol("Contact").params[0].name', 'person', 'The name of a param is found.');
252
+ is('symbols.getSymbol("Contact").params[1].name', 'person.name', 'The name of a param set with a dot name is found.');
253
+ is('symbols.getSymbol("Contact").params[2].name', 'person.age', 'The name of a second param set with a dot name is found.');
254
+ is('symbols.getSymbol("Contact").params[4].name', 'connection', 'The name of a param after config is found.');
255
+
256
+ is('symbols.getSymbol("Family").params[0].name', 'persons', 'Another name of a param is found.');
257
+ is('symbols.getSymbol("Family").params[1].name', 'persons.Father', 'The name of a param+config is found.');
258
+ is('symbols.getSymbol("Family").params[2].name', 'persons.Mother', 'The name of a second param+config is found.');
259
+ is('symbols.getSymbol("Family").params[3].name', 'persons.Children', 'The name of a third param+config is found.');
260
+ }
261
+ ,
262
+ function() {
263
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/ignore.js"]});
264
+ is('LOG.warnings.filter(function($){if($.indexOf("undocumented symbol Ignored") > -1) return $}).length', 1, 'A warning is emitted when documenting members of an ignored parent.');
265
+ }
266
+ ,
267
+ function() {
268
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/functions_anon.js"]});
269
+ is('symbols.getSymbol("a.b").alias', 'a.b', 'In anonymous constructor this is found to be the container object.');
270
+ is('symbols.getSymbol("a.f").alias', 'a.f', 'In anonymous constructor this can have a method.');
271
+ is('symbols.getSymbol("a.c").alias', 'a.c', 'In anonymous constructor method this is found to be the container object.');
272
+ is('symbols.getSymbol("g").alias', 'g', 'In anonymous function executed inline this is the global.');
273
+ is('symbols.getSymbol("bar2.p").alias', 'bar2.p', 'In named constructor executed inline this is the container object.');
274
+ is('symbols.getSymbol("module.pub").alias', 'module.pub', 'In parenthesized anonymous function executed inline function scoped variables arent documented.');
275
+ }
276
+ ,
277
+ function() {
278
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/oblit_anon.js"]});
279
+ is('symbols.getSymbol("opt").name', 'opt', 'Anonymous object properties are created.');
280
+ is('symbols.getSymbol("opt.conf.keep").alias', 'opt.conf.keep', 'Anonymous object first property is assigned to $anonymous.');
281
+ is('symbols.getSymbol("opt.conf.base").alias', 'opt.conf.base', 'Anonymous object second property is assigned to $anonymous.');
282
+ }
283
+ ,
284
+ function() {
285
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/params_optional.js"]});
286
+ is('symbols.getSymbol("Document").params.length', 3, 'Correct number of params are found when optional param syntax is used.');
287
+ is('symbols.getSymbol("Document").params[1].name', "id", 'Name of optional param is found.');
288
+ is('symbols.getSymbol("Document").params[1].isOptional', true, 'Optional param is marked isOptional.');
289
+ is('symbols.getSymbol("Document").params[2].name', "title", 'Name of optional param with default value is found.');
290
+ is('symbols.getSymbol("Document").params[2].isOptional', true, 'Optional param with default value is marked isOptional.');
291
+ is('symbols.getSymbol("Document").params[2].defaultValue', " This is untitled.", 'Optional param default value is found.');
292
+ }
293
+ ,
294
+ function() {
295
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/synonyms.js"]});
296
+ is('symbols.getSymbol("myObject.myFunc").type', 'function', 'Type can be set to function.');
297
+ }
298
+ ,
299
+ function() {
300
+ symbolize({a:true, p:true, _: [SYS.pwd+"test/event.js"]});
301
+ is('symbols.getSymbol("Kitchen#event:cakeEaten").isEvent', true, 'Function with event prefix is an event.');
302
+ is('symbols.getSymbol("Kitchen#cakeEaten").isa', "FUNCTION", 'Function with same name as event isa function.');
303
+ }
304
+ ];
305
+
306
+ //// run and print results
307
+ print(testrun(testCases));
@@ -0,0 +1,75 @@
1
+ == 2.1.0 ==
2
+
3
+ * Added support for the @event tag.
4
+ * Fixed bug that prevented the : character from appearing in symbol names.
5
+ * Fixed bug that prevented underscored symbols marked with @public being tagged as private. (issue #184 )
6
+ * Fixed bug that randomly affected the @memberOf tag when the name of the symbol did not include the parent name.
7
+ * Fixed bug that prevented templates that were not in the jsdoc-toolkit folder from being found. ( issue #176 )
8
+ * Added ability to check for trailing slash on template path. ( issue #177 )
9
+ * Modified classDesc so that it no longer is appended with the constructor desc.
10
+ * Fixed call to plugin onDocCommentSrc.
11
+ * Added missing support for inline doc comments for function return types. ( issue #189 )
12
+ * Added command line option -q, --quiet.
13
+ * Added command line option -E, --exclude. ( issue #143 )
14
+ * Added 2 more hooks for plugins. ( issue #163 )
15
+ * Added support for extending built-ins. ( issue #160 )
16
+ * Added "compact" option to JSDOC.JsPlate.prototype.process. ( issue #159 )
17
+ * @augments no longer documents static members as inherited. ( issue #138 )
18
+ * @link to a class now goes to the page for that class, not the constructor. ( issue #178 )
19
+ * Warnings of mismatched curly brace now include filename. ( issue #166 )
20
+ * Fixed bug affecting template paths loaded via a configuration file when the trailing slash is missing. ( issue #191 )
21
+ * Minor optimizations.
22
+
23
+ == 2.0.2 ==
24
+
25
+ * 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 )
26
+ * Fixed a bug that prevented private variables marked as @public from appearing in the documentation. ( issue #161 )
27
+ * Fixed bug that prevented variable names with underscored properties from appearing in summaries. ( issue #173 )
28
+
29
+ == 2.0.1 ==
30
+
31
+ * Fixed bug that prevented @fileOverview tag from being recognized.
32
+ * Added support for @fieldOf as a synonym for @field plus @memberOf.
33
+ * Added support for @name tag in a @fileOverview comment to control the displayed name of the file.
34
+ * Added support for multiple @example tags. ( issue #152 )
35
+ * Modified style sheet of jsdoc template to make more readable. ( issue #151 )
36
+ * Fixed bug that prevented @since documentation from displaying correctly when it appeared in a class. ( issue #150 )
37
+ * Fixed bug that caused inhertited properties to sometimes not resolve correctly. ( issue #144 )
38
+ * Modified so that trailing whitespace in @example is always trimmed. ( issue #153 )
39
+ * Added support for elseif to JsPlate. (hat tip to fredck)
40
+ * Added support for @location urls in the @overview comment to the jsdoc template.
41
+
42
+ == Changes From Versions 1.4.0 to 2.0.0 ==
43
+
44
+ * Upgraded included version of Rhino from 1.6 to 1.7R1.
45
+ * Removed circular references in parsed documentation objects.
46
+ * Improved inheritance handling, now properties and events can be inherited same as methods.
47
+ * Improved handling of cross-file relationships, now having two related objects in separate files is not a problem.
48
+ * Improved ability to recognize membership of previously defined objects.
49
+ * Added ability to redefine parsing behavior with plugins.
50
+ * @methodOf is a synonym for @function and @memberOf.
51
+ * Added @default to document default values of members that are objects.
52
+ * Added ability to parse and refer to inner functions.
53
+ * Fixed bug that appeared when calling a method to set properties of the instance referred to by "this".
54
+ * Added ability to automatically create links to other symbols.
55
+ * New "jsdoc" template now produces fully W3C valid XHTML.
56
+ * Inline parameter type hint comments are now documented.
57
+ * Fixed error: Locally scoped variables (declared with var) no longer appear as global.
58
+ * It is now possible to run JsDoc Toolkit from any directory.
59
+ * Added support for inline {@link ...} tags.
60
+ * Added support for the -H command-line option to allow for custom content handlers.
61
+ * Tag names @inherits and @scope changed to @borrows and @lends.
62
+ ? Combining @constructor in a doclet with @lends now supported.
63
+ * Multiple @lend tags now supported.
64
+ * Added support for the @constructs tag, used inside a @lends block.
65
+ * Added support for the @constant tag.
66
+ * Fixed bug that prevented the use of [] as a default value.
67
+ * Added support for the @field tag.
68
+ * Added support for the @public tag (applied to inner functions).
69
+ * @namespace tag can now be applied to functions, not just object literals.
70
+ * Added support for the -s command line option to suppress source code output.
71
+ * Added new unit test framework.
72
+ * Underscored symbols are now treated as if they have a @private tag by default.
73
+ * Improved support for anonymous constructors.
74
+ * Added support for the nocode meta tag.
75
+
@@ -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>
@@ -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