From 2994fedbb9237bc8b059e2233ac8da17ddb0b964 Mon Sep 17 00:00:00 2001 From: alan Date: Wed, 28 Apr 2010 13:24:22 +0800 Subject: [PATCH] JSDOC/Packer.js --- JSDOC/Packer.js | 5 +++++ pack.js | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/JSDOC/Packer.js b/JSDOC/Packer.js index 1c1e96b..a922598 100644 --- a/JSDOC/Packer.js +++ b/JSDOC/Packer.js @@ -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 --- 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. } -- 2.39.2