src/jsdoc/Packer.vala
authorAlan Knowles <alan@roojs.com>
Thu, 26 May 2016 09:36:05 +0000 (17:36 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 26 May 2016 09:36:05 +0000 (17:36 +0800)
src/jsdoc/Packer.vala

index c4c7c8e..47b36c5 100644 (file)
@@ -163,6 +163,23 @@ namespace JSDOC
                        this.files.add(f); 
                        GLib.debug("FILE LEN: %d", this.files.size);
                }
+               public string pack()
+               {
+                   this.target = "";
+                       this.targetDebug  = "";
+                   
+                   if (this.files.size < 1) {
+                               throw new PackerError.ArgumentError("No Files loaded before pack() called");
+                       }
+                       if (this.target.length > 0 ) {
+                               this.targetStream = File.new_for_path(this.target).replace(null, false,FileCreateFlags.NONE);
+                       }
+                       if (this.targetDebug.length > 0 ) {
+                               this.targetDebugStream = File.new_for_path(this.targetDebug).replace(null, false,FileCreateFlags.NONE);
+                       }
+                       return this.packAll();
+               }
+               
                
                public string pack(string target, string targetDebug = "")
                {