2 //<script type="text/javascript">
7 * -O Output debug file here.
8 * -t Translate json file.
9 * -w Cache / working dir.
10 * -f File to read with a list of source paths / or class names.
11 * -C no cleanup (use with -w if you need are using a cache directory.)
12 * -p prefix for translation md5 generator (directory that files are in, and is removed
13 * from path when generating an md5 for the translated name.
14 * -a autoversion - suffixes the latest timestamp eg. Core-100000000.js
15 * -i update index file in output directory.
16 * compresses files listed as arguments and outputs result
19 File = imports.File.File;
20 Packer = imports.JSDOC.Packer.Packer;
26 var args = Array.prototype.slice.call(Seed.argv);
28 args.shift(); // pack.js
38 for(var i =0; i < args.length;i++) {
39 if (args[i] == '-o') {
40 cfg.target = args[i+1];
44 if (args[i] == '-O') {
45 cfg.debugTarget = args[i+1];
49 if (args[i] == '-t') {
50 cfg.translateJSON = args[i+1];
54 if (args[i] == '-w') {
55 cfg.tmpDir = args[i+1];
59 if (args[i] == '-p') {
60 cfg.prefix = args[i+1];
65 if (args[i] == '-C') {
69 if (args[i] == '-f') {
70 cfg.srcfiles.push(args[i+1]);
74 if (args[i] == '-i') {
75 cfg.outputIndex = true
78 if (args[i] == '-a') {
82 if (cfg.files.indexOf(args[i]) > -1) {
83 continue; // remove dupes.
85 cfg.files.push(args[i]);
89 pack = new Packer(cfg)
91 print("ERROR " + e.toString());