X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=pack.js;h=da02090af535a49b4f650b645bf460bd7a1782a6;hb=09e90012c223927902c879351bf9b3da52fc7ddb;hp=3a17a4c267e74386ae6068cab4219f34830342e1;hpb=43b95a998e0d221c87f96c4f3031e902957e5141;p=gnome.introspection-doc-generator diff --git a/pack.js b/pack.js old mode 100755 new mode 100644 index 3a17a4c..da02090 --- a/pack.js +++ b/pack.js @@ -11,12 +11,15 @@ * -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. - * + * -a autoBuild - puts target in INPUTDIR/compiled/Core-TIMESTAMP.js and enabled translastion + * -m module name used with autoBuild to force a module name. * compresses files listed as arguments and outputs result */ + +File = imports.File.File; +Packer = imports.JSDOC.Packer.Packer; + -Packer = imports['JSDOC/Packer.js'].Packer; -File = imports.File.File; @@ -26,6 +29,9 @@ args.shift(); // pack.js var cfg = { files : [], target : false, + srcfiles : [], + autoBuild : false, + module : false } @@ -55,15 +61,29 @@ for(var i =0; i < args.length;i++) { i++; continue; } + if (args[i] == '-C') { cfg.cleanup = false; continue; } if (args[i] == '-f') { - cfg.srcfile = args[i+1]; + cfg.srcfiles.push(args[i+1]); + i++; + continue; + } + if (args[i] == '-m') { + cfg.module = args[i+1]; i++; continue; } + if (args[i] == '-a') { + cfg.autoBuild = true + continue; + } + if (args[i] == '-w') { + cfg.keepWhite = true + continue; + } if (cfg.files.indexOf(args[i]) > -1) { continue; // remove dupes. }