From 84ca3637935bfed3217ff5200712d55245940ca7 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 27 Jul 2010 13:12:58 +0800 Subject: [PATCH] JSDOC/Packer.js --- JSDOC/Packer.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/JSDOC/Packer.js b/JSDOC/Packer.js index 897c22d..8ca047d 100644 --- a/JSDOC/Packer.js +++ b/JSDOC/Packer.js @@ -89,7 +89,7 @@ Packer = function(cfg) version = Math.max(File.mtime(f), version); }); var dirname = GLib.path_get_dirname(this.files[0]); - var outname = GLib.path_get_basename(dirname); + var outname = this.module ? this.module : GLib.path_get_basename(dirname); this.target = dirname + '/compiled/' + outname + '-' + version + '.js'; if (File.exists(this.target)) { print("Target file already exists"); @@ -108,12 +108,12 @@ Packer = function(cfg) } Packer.prototype = { /** - * @prop srcfiles {String} file containing a list of files/or classes to use. + * @cfg {String} srcfiles file containing a list of files/or classes to use. */ srcfile : false, /** - * @prop files {Array} list of files to compress (must be full path) + * @cfg {Array} files list of files to compress (must be full path) */ files : false, /** @@ -125,12 +125,16 @@ Packer.prototype = { * and enables translation toolkit. */ autoBuild : false, + /** + * @cfg {String} module used with autoBuild to force a file name + */ + module: false, /** - * @prop debugTarget {String} target to write files debug version to (uncompacted)- must be full path. + * @cfg {String} debugTargettarget to write files debug version to (uncompacted)- must be full path. */ debugTarget : '', // merged file without compression. /** - * @prop tmpDir {String} (optional) where to put the temporary files. + * @cfg {String} tmpDir (optional) where to put the temporary files. * if you set this, then files will not be cleaned up */ tmpDir : '/tmp', @@ -138,13 +142,13 @@ Packer.prototype = { translateJSON : '', // json based list of strings in all files. /** - * @prop cleanup {Boolean} (optional) clean up temp files after done - + * @cfg {Boolean} cleanup (optional) clean up temp files after done - * Defaults to false if you set tmpDir, otherwise true. */ cleanup : true, /** - * @prop prefix {String} (optional) prefix of directory to be stripped of when + * @cfg {String} prefix (optional) prefix of directory to be stripped of when * Calculating md5 of filename */ prefix : '', -- 2.39.2