var link = false;
if (cfg.autoBuild) {
+
+ function dateString(d){
+ function pad(n){return n<10 ? '0'+n : n}
+ return d.getUTCFullYear() +
+ pad(d.getUTCMonth()+1)+
+ pad(d.getUTCDate())+'_'+
+ pad(d.getUTCHours())+
+ pad(d.getUTCMinutes())+'
+ pad(d.getUTCSeconds());
+ }
+
+
+
var version = 0;
this.files.forEach(function(f) {
version = Math.max(File.mtime(f), version);
});
+ var version = dateString(new Date(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)) {
- print("Target file already exists");
+ print("Target file already exists: " + this.target);
Seed.quit();
}
this.prefix = dirname +'/';
}
-
+ print(this.translateJSON);
this.timer = new Date() * 1;
this.packAll();
*/
cleanup : true,
/**
- * @cfg {Boolean} cleanup (optional) clean up temp files after done -
- * Defaults to false if you set tmpDir, otherwise true.
+ * @cfg {Boolean} keepWhite (optional) do not remove white space in output.
+ * usefull for debugging compressed files.
*/
keepWhite: true,
}
}
+ print("Output file: " + this.target);
+ if (this.debugTarget) print("Output debug file: " + this.debugTarget);
keepWhite : true,
keepComments : true,
sepIdents : true,
- collapseWhite : false
+ collapseWhite : false,
+ filename : fn
});
this.timerPrint("START" + fn);
var out = CompressWhite(new TokenStream(toks), this, this.keepWhite); // do not kill whitespace..
+
this.timerPrint("Compressed");
return out;