JSDOC/BuildDocs.js
[gnome.introspection-doc-generator] / JSDOC / BuildDocs.js
index 6bbf2c9..f9beecf 100644 (file)
@@ -31,15 +31,11 @@ BuildDocs = {
     
     srcFiles : [],
     
-    build : function (opts)
+    build : function ()
     {
-        
-        XObject.extend(Options, opts);
          
         Options.init();
         
-     
-        
         Options.LOG.inform("JsDoc Toolkit main() running at "+new Date()+".");
         //Options.LOG.inform("With options: ");
         
@@ -150,7 +146,7 @@ BuildDocs = {
         
         
         Parser.finish();
-    }
+    },
     
      
         
@@ -280,7 +276,7 @@ BuildDocs = {
         
     },
 
-    publishJSON = function(file, data)
+    publishJSON : function(file, data)
     {
         // what we need to output to be usefull...
         // a) props..
@@ -344,13 +340,13 @@ BuildDocs = {
     {
         
         
-        if (!name) {
-            name = sourceFile.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_");
-            name = name.replace(/\:/g, "_");
-        }
+        name = sourceFile.substring(Options.baseDir.length);
+        name = name.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_");
+        name = name.replace(/\:/g, "_"); //??
+        
         
         var pretty = imports.PrettyPrint.toPretty(File.read(sourceFile));
-        File.write(Options.target+"/symbols/src" + prettyfile, 
+        File.write(Options.target+"/symbols/src/" + name, 
             '<html><head>' +
             '<title>' + sourceFile + '</title>' +
             '<link rel="stylesheet" type="text/css" href="../../../highlight-js.css"/>' +