JSDOC/Packer.js
authoralan <alan@alanfast.akbkhome.com>
Wed, 21 Apr 2010 05:44:38 +0000 (13:44 +0800)
committeralan <alan@alanfast.akbkhome.com>
Wed, 21 Apr 2010 05:44:38 +0000 (13:44 +0800)
JSDOC/Packer.js

index 66de07b..3155df3 100644 (file)
@@ -196,12 +196,18 @@ Packer.prototype = {
                     if (str.length) {
                         File.append(this.target, str + "\n");
                     }
+                    if (this.cleanup) {
+                        File.remove(transmd5);
+                    }
                 }
                 if (File.exists(transfile)) {
                     var str = File.read(transfile);
                     if (str.length) {
                         File.append(this.translateJson, str);
                     }
+                    if (this.cleanup) {
+                        File.remove(transfile);
+                    }
                 }
                 
                
@@ -213,6 +219,8 @@ Packer.prototype = {
         for(var i=0; i < files.length; i++)  {
             
             var minfile = bpath + '/' + this.files.replace(/\//g, '.');
+            
+            
             if (!File.exists(minfile)) {
                 continue;
             }
@@ -221,15 +229,13 @@ Packer.prototype = {
             if (str.length) {
                 File.append(this.target, str + "\n");
             }
-        }
-        
-        
-        //File.append(dout, "\n");// end the function 
-        if (this.cleanup) {
-            
-            
+            if (this.cleanup) {
+                File.remove(minfile);
+            }
             
         }
+        
+         
     
     
     },