JSDOC/Packer.js
authoralan <alan@desktop.akbkhome.com>
Wed, 28 Apr 2010 05:24:22 +0000 (13:24 +0800)
committeralan <alan@desktop.akbkhome.com>
Wed, 28 Apr 2010 05:24:22 +0000 (13:24 +0800)
JSDOC/Packer.js
pack.js

index 1c1e96b..a922598 100644 (file)
@@ -81,6 +81,11 @@ Packer = function(cfg)
  
 }
 Packer.prototype = {
+    /**
+     * @prop srcfiles {String} file containing a list of files/or classes to use.
+     */
+    srcfiles : false,
+    
     /**
      * @prop files {Array} list of files to compress (must be full path)
      */
diff --git a/pack.js b/pack.js
index bb63856..52fb639 100755 (executable)
--- a/pack.js
+++ b/pack.js
@@ -6,6 +6,7 @@
  * -o Output
  * -t Translate json file.
  * -w Cache / working dir.
+ * -f File to read with a list of source paths / or class names.
  * -C no cleanup (use with -w if you need are using a cache directory.)
  * -p prefix for translation md5 generator (directory that files are in, and is removed 
  *    from path when generating an md5 for the translated name.
@@ -52,6 +53,11 @@ for(var i =0; i < args.length;i++) {
         cfg.cleanup = false;
         continue;
     }
+    if (args[i] == '-f') {
+        cfg.srclist = args[i+1];
+        i++;
+        continue;
+    }
     if (cfg.files.indexOf(args[i]) > -1) {
         continue; // remove dupes.
     }