Merge 18b2324983 into a64bdda9ae
This commit is contained in:
commit
8ba9532d2a
|
|
@ -1,10 +1,8 @@
|
||||||
var path = require("path");
|
var path = require("path");
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
var vm = require("vm");
|
var vm = require("vm");
|
||||||
var sys = require("util");
|
|
||||||
|
|
||||||
var UglifyJS = vm.createContext({
|
var UglifyJS = vm.createContext({
|
||||||
sys : sys,
|
|
||||||
console : console,
|
console : console,
|
||||||
MOZ_SourceMap : require("source-map")
|
MOZ_SourceMap : require("source-map")
|
||||||
});
|
});
|
||||||
|
|
@ -17,7 +15,7 @@ function load_global(file) {
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
// XXX: in case of a syntax error, the message is kinda
|
// XXX: in case of a syntax error, the message is kinda
|
||||||
// useless. (no location information).
|
// useless. (no location information).
|
||||||
sys.debug("ERROR in file: " + file + " / " + ex);
|
console.debug("ERROR in file: " + file + " / " + ex);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -39,7 +37,7 @@ var FILES = exports.FILES = [
|
||||||
FILES.forEach(load_global);
|
FILES.forEach(load_global);
|
||||||
|
|
||||||
UglifyJS.AST_Node.warn_function = function(txt) {
|
UglifyJS.AST_Node.warn_function = function(txt) {
|
||||||
sys.error("WARN: " + txt);
|
console.error("WARN: " + txt);
|
||||||
};
|
};
|
||||||
|
|
||||||
// XXX: perhaps we shouldn't export everything but heck, I'm lazy.
|
// XXX: perhaps we shouldn't export everything but heck, I'm lazy.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user