Collapse = imports.Collapse.Collapse;
GLib = imports.gi.GLib;
+Gio = imports.gi.Gio;
/**
* @namespace JSDOC
* @class Packer
throw "No Files";
}
+ var link = false;
if (cfg.autoBuild) {
var version = 0;
this.files.forEach(function(f) {
- print(f);
version = Math.max(File.mtime(f), version);
});
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';
- if (File.exists(this.target)) {
+ if (File.exists(this.target)) {
print("Target file already exists");
Seed.quit();
}
}
-
+ print(this.translateJSON);
this.timer = new Date() * 1;
this.packAll();
+
+
}
Packer.prototype = {
* Defaults to false if you set tmpDir, otherwise true.
*/
cleanup : true,
+ /**
+ * @cfg {Boolean} keepWhite (optional) do not remove white space in output.
+ * usefull for debugging compressed files.
+ */
+
+ keepWhite: true,
/**
* @cfg {String} prefix (optional) prefix of directory to be stripped of when
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;