clear generated jsdoc; add script
[dygraphs.git] / jsdoc-toolkit / app / lib / JSDOC.js
1 /**
2 @overview
3 @date $Date: 2010-06-13 22:02:44 +0100 (Sun, 13 Jun 2010) $
4 @version $Revision: 837 $
5 @location $HeadURL: https://jsdoc-toolkit.googlecode.com/svn/tags/jsdoc_toolkit-2.4.0/jsdoc-toolkit/app/lib/JSDOC.js $
6 @name JSDOC.js
7 */
8
9 /**
10 This is the main container for the JSDOC application.
11 @namespace
12 */
13 JSDOC = {
14 };
15
16 /**
17 @requires Opt
18 */
19 if (typeof arguments == "undefined") arguments = [];
20 JSDOC.opt = Opt.get(
21 arguments,
22 {
23 a: "allfunctions",
24 c: "conf",
25 d: "directory",
26 "D[]": "define",
27 e: "encoding",
28 "E[]": "exclude",
29 h: "help",
30 m: "multiple",
31 n: "nocode",
32 o: "out",
33 p: "private",
34 q: "quiet",
35 r: "recurse",
36 S: "securemodules",
37 s: "suppress",
38 t: "template",
39 T: "testmode",
40 u: "unique",
41 v: "verbose",
42 x: "ext"
43 }
44 );
45
46 /** The current version string of this application. */
47 JSDOC.VERSION = "2.4.0";
48
49 /** Print out usage information and quit. */
50 JSDOC.usage = function() {
51 print("USAGE: java -jar jsrun.jar app/run.js [OPTIONS] <SRC_DIR> <SRC_FILE> ...");
52 print("");
53 print("OPTIONS:");
54 print(" -a or --allfunctions\n Include all functions, even undocumented ones.\n");
55 print(" -c or --conf\n Load a configuration file.\n");
56 print(" -d=<PATH> or --directory=<PATH>\n Output to this directory (defaults to \"out\").\n");
57 print(" -D=\"myVar:My value\" or --define=\"myVar:My value\"\n Multiple. Define a variable, available in JsDoc as JSDOC.opt.D.myVar.\n");
58 print(" -e=<ENCODING> or --encoding=<ENCODING>\n Use this encoding to read and write files.\n");
59 print(" -E=\"REGEX\" or --exclude=\"REGEX\"\n Multiple. Exclude files based on the supplied regex.\n");
60 print(" -h or --help\n Show this message and exit.\n");
61 print(" -m or --multiples\n Don't warn about symbols being documented more than once.\n");
62 print(" -n or --nocode\n Ignore all code, only document comments with @name tags.\n");
63 print(" -o=<PATH> or --out=<PATH>\n Print log messages to a file (defaults to stdout).\n");
64 print(" -p or --private\n Include symbols tagged as private, underscored and inner symbols.\n");
65 print(" -q or --quiet\n Do not output any messages, not even warnings.\n");
66 print(" -r=<DEPTH> or --recurse=<DEPTH>\n Descend into src directories.\n");
67 print(" -s or --suppress\n Suppress source code output.\n");
68 print(" -S or --securemodules\n Use Secure Modules mode to parse source code.\n");
69 print(" -t=<PATH> or --template=<PATH>\n Required. Use this template to format the output.\n");
70 print(" -T or --test\n Run all unit tests and exit.\n");
71 print(" -u or --unique\n Force file names to be unique, but not based on symbol names.\n");
72 print(" -v or --verbose\n Provide verbose feedback about what is happening.\n");
73 print(" -x=<EXT>[,EXT]... or --ext=<EXT>[,EXT]...\n Scan source files with the given extension/s (defaults to js).\n");
74
75 quit();
76 }
77
78 /*t:
79 plan(4, "Testing JSDOC namespace.");
80
81 is(
82 typeof JSDOC,
83 "object",
84 "JSDOC.usage is a function."
85 );
86
87 is(
88 typeof JSDOC.VERSION,
89 "string",
90 "JSDOC.VERSION is a string."
91 );
92
93 is(
94 typeof JSDOC.usage,
95 "function",
96 "JSDOC.usage is a function."
97 );
98
99 is(
100 typeof JSDOC.opt,
101 "object",
102 "JSDOC.opt is a object."
103 );
104 */
105
106 if (this.IO) IO.includeDir("lib/JSDOC/");