PageRenderTime 16ms CodeModel.GetById 9ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/jsdoc_toolkit-2.2.1/jsdoc-toolkit/app/lib/JSDOC.js

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