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';
- 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();
- if (link) {
- if (File.exists(link)) {
- File.remove(link);
- }
- var f = Gio.file_new_for_path(this.target);
- f.create_symbolic_link(link);
- }
* 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
//var ts = new TokenStream(toks);
//print(JSON.stringify(toks, null,4 )); Seed.quit();
var ts = new Collapse(toks);
- // print(JSON.stringify(ts.tokens, null,4 )); Seed.quit();
+ print(JSON.stringify(ts.tokens, null,4 )); Seed.quit();
//return;//
var sp = new ScopeParser(ts);
this.timerPrint("Converted to Parser");
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;