JSDOC/BuildDocs.js
authorAlan Knowles <alan@akkbhome.com>
Tue, 20 Jul 2010 22:09:54 +0000 (06:09 +0800)
committerAlan Knowles <alan@akkbhome.com>
Tue, 20 Jul 2010 22:09:54 +0000 (06:09 +0800)
JSDOC/BuildDocs.js

index b9fd6cc..d9eb5e4 100644 (file)
@@ -18,8 +18,7 @@ TokenStream = imports.TokenStream.TokenStream;
 Symbol      = imports.Symbol.Symbol;
 DocComment  = imports.DocComment.DocComment;
 
-/******************    INCLUDES ARE ALL AT THE BOTTOM OF THIS FILE!!!!! *******************/
-
 // should not realy be here -- or anywhere...??
 
 function makeSortby(attribute) {
@@ -68,7 +67,10 @@ BuildDocs = {
         
         
     },
-    
+    /**
+     * create a list of files in this.srcFiles using list of directories / files in Options.src
+     * 
+     */
     
     _getSrcFiles : function() 
     {
@@ -97,6 +99,10 @@ BuildDocs = {
         //Seed.print(JSON.stringify(this.srcFiles, null,4));Seed.quit();
         return this.srcFiles;
     },
+    /**
+     * Parse the source files.
+     * 
+     */
 
     _parseSrcFiles : function() 
     {
@@ -107,12 +113,13 @@ BuildDocs = {
             var srcFile = this.srcFiles[i];
             
             
-            var cacheFile = Options.cacheDirectory + srcFile.replace(/\//g, '_') + ".cache";
+            var cacheFile = !Options.cacheDirectory.length ? false : 
+                Options.cacheDirectory + srcFile.replace(/\//g, '_') + ".cache";
             
             //println(cacheFile);
             // disabled at present!@!!
             
-            if (false && !Options.disablecache  && File.exists(cacheFile)) {
+            if (cacheFile  && File.exists(cacheFile)) {
                 // check filetime?
                 
                 var c_mt = File.getTimes(cacheFile);
@@ -153,7 +160,7 @@ BuildDocs = {
             var ts = new TokenStream(tr.tokenize(txs));
         
             Parser.parse(ts, srcFile);
-              
+            
             //var outstr = JSON.stringify(
             //    Parser.filesSymbols[srcFile]._index
             //);