mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
delete node env
This commit is contained in:
parent
40fec52702
commit
ef1af49a5a
34
website/src/vendor/mgba.js
vendored
34
website/src/vendor/mgba.js
vendored
|
@ -187,39 +187,7 @@ var mGBA = (function () {
|
|||
var read_, readAsync, readBinary, setWindowTitle;
|
||||
var nodeFS;
|
||||
var nodePath;
|
||||
if (ENVIRONMENT_IS_NODE) {
|
||||
scriptDirectory = __dirname + "/";
|
||||
read_ = function shell_read(filename, binary) {
|
||||
if (!nodeFS) nodeFS = require("fs");
|
||||
if (!nodePath) nodePath = require("path");
|
||||
filename = nodePath["normalize"](filename);
|
||||
return nodeFS["readFileSync"](filename, binary ? null : "utf8");
|
||||
};
|
||||
readBinary = function readBinary(filename) {
|
||||
var ret = read_(filename, true);
|
||||
if (!ret.buffer) {
|
||||
ret = new Uint8Array(ret);
|
||||
}
|
||||
assert(ret.buffer);
|
||||
return ret;
|
||||
};
|
||||
if (process["argv"].length > 1) {
|
||||
thisProgram = process["argv"][1].replace(/\\/g, "/");
|
||||
}
|
||||
arguments_ = process["argv"].slice(2);
|
||||
process["on"]("uncaughtException", function (ex) {
|
||||
if (!(ex instanceof ExitStatus)) {
|
||||
throw ex;
|
||||
}
|
||||
});
|
||||
process["on"]("unhandledRejection", abort);
|
||||
quit_ = function (status) {
|
||||
process["exit"](status);
|
||||
};
|
||||
Module["inspect"] = function () {
|
||||
return "[Emscripten Module object]";
|
||||
};
|
||||
} else if (ENVIRONMENT_IS_SHELL) {
|
||||
if (ENVIRONMENT_IS_SHELL) {
|
||||
if (typeof read != "undefined") {
|
||||
read_ = function shell_read(f) {
|
||||
return read(f);
|
||||
|
|
Loading…
Reference in a new issue