Added support for ender.

- It defines everything to look and act like node, which makes `require('fs')` throw an exception (unloaded module).
This commit is contained in:
Benjamin Horsleben 2012-12-11 19:02:44 +01:00
parent 2e102c72b2
commit 1d3f306fb8

View File

@ -117,8 +117,11 @@ var g_output_modifiers = [];
// Automatic Extension Loading (node only): // Automatic Extension Loading (node only):
// //
if (typeof module !== 'undefind' && typeof exports !== 'undefined' && typeof require !== 'undefind') { if (typeof module !== 'undefined' && typeof exports !== 'undefined' && typeof require !== 'undefined') {
var fs = require('fs'); var fs;
try {
fs = require('fs');
} catch(e) {}
if (fs) { if (fs) {
// Search extensions folder // Search extensions folder