Changed roojspacker/DocBuilder.valaroojspacker/PackerRun.vala
authorAlan Knowles <alan@roojs.com>
Mon, 26 Jul 2021 07:15:38 +0000 (15:15 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 26 Jul 2021 07:15:38 +0000 (15:15 +0800)
roojspacker/DocBuilder.vala
roojspacker/PackerRun.vala

index eb31e26..43ea124 100644 (file)
@@ -34,6 +34,25 @@ namespace JSDOC
                     
                    // this currently uses the concept of publish.js...
                    
+                   if (PackerRun.singleton().dump_tree) {
+                               var   generator = new Json.Generator ();
+                           var  root = new Json.Node(Json.NodeType.OBJECT);
+                               root.init_object(jsonAll);
+                               generator.set_root (root);
+                               generator.pretty=  true;
+                               generator.indent = 2;
+                               GLib.warning("writing JSON:  %s", PackerRun.singleton().opt_doc_target+"/json/roodata.json");
+                               
+                               
+                               this.writeJson(generator, null);
+                               exit;
+                       }
+                       size_t l;
+                       //GLib.debug("JSON: %s", generator.to_data(out l));
+                   
+                   
+                   
+                   
                    this.publish();
         
         
index 1ff926f..936d209 100644 (file)
@@ -49,7 +49,7 @@ namespace JSDOC
                private string[]? opt_files = null;
                [CCode (array_length = false, array_null_terminated = true)]
                private  string[]? opt_files_from = null;
-               
+                
                
                public  bool opt_debug = false;
                
@@ -235,7 +235,7 @@ namespace JSDOC
                                        flags = 0,
                                        arg =  OptionArg.STRING,
                                        arg_data = &opt_doc_target,
-                                       description = "Target location for documetnation",
+                                       description = "Target location for documentation",
                                        arg_description = null
                                },