X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FOptions.js;h=7b81f3863fe3d0fb030ec0d0f997e36dfcf5beb6;hp=beaeb45f40b9eb7fd57c3c009f7c3d12ce21c8c9;hb=HEAD;hpb=6a1e2129b5675f41e4791b740cf86033d50ea48a diff --git a/JSDOC/Options.js b/JSDOC/Options.js index beaeb45..7b81f38 100644 --- a/JSDOC/Options.js +++ b/JSDOC/Options.js @@ -22,9 +22,9 @@ Options = { "--exclude-src" : 'Ex', "--baseDir" : 'Base Directory (root directory of code)', "--target" : 'Target Directory (where html files go)', - "--cacheDirectory": 'Cached Files Directory', + "--cacheDirectory": 'Cached Files Directory (or blank to not cache)', "--conf" : 'Read From a Configuration file', // was c. - configuration file.. - parsed with JSON.parse - "--template" : 'Template Directory', // was t. + "--templateDir" : 'Template Directory', // was t. // "recurse": false, // was r. - not supported.. "--ext" : 'Extension of code files to read (normally js)', // was x. "--publishExt" : 'Extension of html files to write (normally html)', @@ -50,7 +50,7 @@ Options = { "target" : '', // was d. ?? source directory (needed to put temporary files..) "cacheDirectory" : '', "conf" : '', // was c. - configuration file.. - parsed with JSON.parse - "template": '', // was t. + "templateDir": '', // was t. // "recurse": false, // was r. - not supported.. "ext": 'js', // was x. "publishExt" : 'html', @@ -67,6 +67,11 @@ Options = { "disablecache": '', // was C "define" : [], // was D. "handler" : [], // was H -- not supported.. + + + "version" : "1.0", + "copyright" : "LGPL", + LOG : { warn : function(str) { print("Warn: " +str ); @@ -122,7 +127,7 @@ Options = { if (!v.length || v[0] != '/') { v = _this.baseDir + (v.length ? '/' + v : ''); } - if (!File.isDirectory(v)) { + if (!File.exists(v)) { throw { name: "ArgumentError", message: "invalid Source Directory : " + v @@ -132,14 +137,14 @@ Options = { }); - if (!this.template) { + if (!this.templateDir) { throw { name: "ArgumentError", - message: "No template Directory specified" + message: "No templateDir Directory specified" }; } - if (this.template[0] !='/') { - this.template = this.baseDir + '/' + this.template; + if (this.templateDir[0] !='/') { + this.templateDir = this.baseDir + '/' + this.templateDir; } @@ -149,7 +154,8 @@ Options = { message: "No directory specified" }; } - + + //print(JSON.stringify(this, null,4)); // should cacheDirectory be a subdirectory of target?? // if not set.. @@ -208,17 +214,19 @@ Options = { i++; while(i < args.length) { - if (args[i].substring(0,2) != '--'){ - + if (args[i].substring(0,2) == '--'){ + i--; break; } this[a].push(args[i]); + i++; } - i--; + + continue; } throw { name: "ArgumentError", - message: "Do not know how to handle: " + a + message: "Do not know how to handle: " + a + ' ' + typeof(this[a]) }; }