JSDOC/Options.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 30 Jun 2010 09:27:39 +0000 (17:27 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 30 Jun 2010 09:27:39 +0000 (17:27 +0800)
JSDOC/Options.js

index 5e96f4e..69f8669 100644 (file)
@@ -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..