var fs = require("fs");
var vm = require("vm");
var sys = require("util");
var path = require("path");
var UglifyJS = vm.createContext({
sys : sys,
console : console,
MOZ_SourceMap : require("source-map")
});
function load_global(file) {
file = path.resolve(path.dirname(module.filename), file);
try {
var code = fs.readFileSync(file, "utf8");
return vm.runInContext(code, UglifyJS, file);
} catch(ex) {
// XXX: in case of a syntax error, the message is kinda
// useless. (no location information).
sys.debug("ERROR in file: " + file + " / " + ex);
process.exit(1);
}
};
load_global("../lib/utils.js");
load_global("../lib/ast.js");
load_global("../lib/parse.js");
load_global("../lib/transform.js");
load_global("../lib/scope.js");
load_global("../lib/output.js");
load_global("../lib/compress.js");
load_global("../lib/sourcemap.js");
UglifyJS.AST_Node.warn_function = function(txt) {
sys.error("WARN: " + txt);
};
// XXX: perhaps we shouldn't export everything but heck, I'm lazy.
for (var i in UglifyJS) {
if (UglifyJS.hasOwnProperty(i)) {
exports[i] = UglifyJS[i];
}
}
adecd7fe48745'>refslogtreecommitdiff
|
Age | Commit message (Expand) | Author |
2020-12-09 | services: science.scm: Add missing copyright headers....This module was always supposed to have the GPL3 header in place.
Follow-up to 8f19e63f760fe02f9969225da2f3f3c36801218f.
* gnu/services/science.scm: Add Copyright headers.
| Efraim Flashner |
2020-06-28 | services: Add rshiny service....* gnu/services/science.scm: New file.
(<rshiny-configuration>): New record.
(rshiny-shepherd-service-type): New variable.
* doc/guix.texi (Miscellaneous Services): Document it.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
| Efraim Flashner |