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';
+ link = dirname + '/compiled/' + outname + '.js';
if (File.exists(this.target)) {
print("Target file already exists");
Seed.quit();
this.translateJSON = dirname + '/compiled/_translation_.js';
}
-
- print(this);
- Seed.quit();
+
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.make_symbolic_link(link);
+ }
+
+
}
Packer.prototype = {