PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/jsdoc-toolkit/app/lib/JSDOC.js

http://jsdoc-toolkit.googlecode.com/
JavaScript | 108 lines | 58 code | 7 blank | 43 comment | 3 complexity | 66b30d8465c0e9da443201dc9a12df56 MD5 | raw file
  1/**
  2	@overview
  3	@date $Date: 2010-07-03 09:55:05 +0200 (Sat, 03 Jul 2010) $
  4	@version $Revision: 846 $ 
  5	@location $HeadURL: http://jsdoc-toolkit.googlecode.com/svn/trunk/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		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		P: "plugins",
 35		q: "quiet",
 36		r: "recurse",
 37		S: "securemodules",
 38		s: "suppress",
 39		t: "template",
 40		T: "testmode",
 41		u: "unique",
 42		v: "verbose",
 43		x: "ext"
 44	}
 45);
 46
 47/** The current version string of this application. */
 48JSDOC.VERSION = "2.4.0";
 49
 50/** Print out usage information and quit. */
 51JSDOC.usage = function() {
 52	print("USAGE: java -jar jsrun.jar app/run.js [OPTIONS] <SRC_DIR> <SRC_FILE> ...");
 53	print("");
 54	print("OPTIONS:");
 55	print("  -a or --allfunctions\n          Include all functions, even undocumented ones.\n");
 56	print("  -c or --conf\n          Load a configuration file.\n");
 57	print("  -d=<PATH> or --directory=<PATH>\n          Output to this directory (defaults to \"out\").\n");
 58	print("  -D=\"myVar:My value\" or --define=\"myVar:My value\"\n          Multiple. Define a variable, available in JsDoc as JSDOC.opt.D.myVar.\n");
 59	print("  -e=<ENCODING> or --encoding=<ENCODING>\n          Use this encoding to read and write files.\n");
 60	print("  -E=\"REGEX\" or --exclude=\"REGEX\"\n          Multiple. Exclude files based on the supplied regex.\n");
 61	print("  -h or --help\n          Show this message and exit.\n");
 62	print("  -m or --multiples\n          Don't warn about symbols being documented more than once.\n");
 63	print("  -n or --nocode\n          Ignore all code, only document comments with @name tags.\n");
 64	print("  -o=<PATH> or --out=<PATH>\n          Print log messages to a file (defaults to stdout).\n");
 65	print("  -p or --private\n          Include symbols tagged as private, underscored and inner symbols.\n");
 66	print("  -P or --plugins\n          Load additional plugins from the specified folder.\n");
 67	print("  -q or --quiet\n          Do not output any messages, not even warnings.\n");
 68	print("  -r=<DEPTH> or --recurse=<DEPTH>\n          Descend into src directories.\n");
 69	print("  -s or --suppress\n          Suppress source code output.\n");
 70	print("  -S or --securemodules\n          Use Secure Modules mode to parse source code.\n");
 71	print("  -t=<PATH> or --template=<PATH>\n          Required. Use this template to format the output.\n");
 72	print("  -T or --test\n          Run all unit tests and exit.\n");
 73	print("  -u or --unique\n          Force file names to be unique, but not based on symbol names.\n");
 74	print("  -v or --verbose\n          Provide verbose feedback about what is happening.\n");
 75	print("  -x=<EXT>[,EXT]... or --ext=<EXT>[,EXT]...\n          Scan source files with the given extension/s (defaults to js).\n");
 76	
 77	quit();
 78}
 79
 80/*t:
 81	plan(4, "Testing JSDOC namespace.");
 82	
 83	is(
 84		typeof JSDOC,
 85		"object",
 86		"JSDOC.usage is a function."
 87	);
 88	
 89	is(
 90		typeof JSDOC.VERSION,
 91		"string",
 92		"JSDOC.VERSION is a string."
 93	);
 94	
 95	is(
 96		typeof JSDOC.usage,
 97		"function",
 98		"JSDOC.usage is a function."
 99	);
100	
101	is(
102		typeof JSDOC.opt,
103		"object",
104		"JSDOC.opt is a object."
105	);
106 */
107
108if (this.IO) IO.includeDir("lib/JSDOC/");