X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FPacker.js;h=c210e103834edd2ee00df66a1ff42b97a96663d2;hb=ab7b5e052b300dd877a1ef064e5cb97e96b64aae;hp=1f5525b51c0e70cfa1b27f77ac5545146e46f329;hpb=c7be9faeddea6367bb00a37b6ce5c3bef43595e2;p=gnome.introspection-doc-generator diff --git a/JSDOC/Packer.js b/JSDOC/Packer.js index 1f5525b..c210e10 100644 --- a/JSDOC/Packer.js +++ b/JSDOC/Packer.js @@ -93,9 +93,7 @@ Packer = function(cfg) var dirname = GLib.path_get_dirname(this.files[0]); var outname = this.module ? this.module : GLib.path_get_basename(dirname); this.target = dirname + '/compiled/' + outname + '-' + version + '.js'; - link = dirname + '/compiled/' + outname + '.js'; - linkTarget = './' + GLib.path_get_basename(this.target); - if (File.exists(this.target)) { + if (File.exists(this.target)) { print("Target file already exists"); Seed.quit(); } @@ -108,13 +106,6 @@ Packer = function(cfg) this.timer = new Date() * 1; this.packAll(); - if (link) { - if (File.exists(link)) { - File.remove(link); - } - var f = Gio.file_new_for_path(link); - f.make_symbolic_link(linkTarget); - } @@ -159,6 +150,12 @@ Packer.prototype = { * Defaults to false if you set tmpDir, otherwise true. */ cleanup : true, + /** + * @cfg {Boolean} cleanup (optional) clean up temp files after done - + * Defaults to false if you set tmpDir, otherwise true. + */ + + keepWhite: true, /** * @cfg {String} prefix (optional) prefix of directory to be stripped of when @@ -397,8 +394,8 @@ Packer.prototype = { print(sp.warnings.join("\n")); - //var out = CompressWhite(new TokenStream(toks), this, true); // do not kill whitespace.. - var out = CompressWhite(new TokenStream(toks), this, false); + var out = CompressWhite(new TokenStream(toks), this, this.keepWhite); // do not kill whitespace.. + this.timerPrint("Compressed"); return out;