From 2027ec4095fb95827269153ec54c016b82d2a620 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 30 Jun 2010 17:27:39 +0800 Subject: [PATCH] JSDOC/Options.js --- JSDOC/Options.js | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/JSDOC/Options.js b/JSDOC/Options.js index 5e96f4e..69f8669 100644 --- a/JSDOC/Options.js +++ b/JSDOC/Options.js @@ -87,13 +87,27 @@ Options = { XObject.extend(this, JSON.parse(File.read(this.conf)));; } // help ?? -- usage.. - + if (!this.baseDir) { + throw { + name: "ArgumentError", + message: "No baseDir specified" + }; + } if (!this.src.length) { throw { name: "ArgumentError", message: "No source directories specified" }; } + // append full path to source directories. + var _this= this; + this.src.forEach(function(v, i) { + if (v[0] != '/') { + this.src[i] = _this.baseDir + '/' + v; + } + } + + if (!this.template) { throw { name: "ArgumentError", @@ -107,12 +121,7 @@ Options = { message: "No directory specified" }; } - f (!this.baseDir) { - throw { - name: "ArgumentError", - message: "No baseDir specified" - }; - } + // should cacheDirectory be a subdirectory of target?? // if not set.. -- 2.39.2