JSDOC/Packer.js
[gnome.introspection-doc-generator] / JSDOC / Packer.js
index 02db466..e4c3e8b 100644 (file)
@@ -71,9 +71,12 @@ Packer = function(cfg)
 {
     
     XObject.extend(this, cfg);
-    
-    if (this.srcfile) {
-        this.loadSourceFile();
+    var _this = this;
+    if (this.srcfile.length) {
+        this.srcfile.forEach(function(f) {
+            _this.loadSourceFile(f);
+        });
+        
     }
     
     if (!this.files) {
@@ -126,9 +129,9 @@ Packer.prototype = {
     out : '', // if no target is specified - then this will contain the result
     
     
-    loadSourceFile : function()
+    loadSourceFile : function(srcfile)
     {
-        var lines = File.read(this.srcfile).split("\n");
+        var lines = File.read(srcfile).split("\n");
         var _this = this;
         lines.forEach(function(f) {
             
@@ -350,7 +353,8 @@ Packer.prototype = {
         print(sp.warnings.join("\n"));
         
         
-        var out = CompressWhite(new TokenStream(toks), this, false); // use true to just do var replacements
+        //var out = CompressWhite(new TokenStream(toks), this, true); // do not kill whitespace..
+        var out = CompressWhite(new TokenStream(toks), this, false);
         this.timerPrint("Compressed");
         return out;