aboutsummaryrefslogtreecommitdiff
path: root/src/shell.js
diff options
context:
space:
mode:
authorJazz <jazzzz@gmail.com>2013-05-16 18:34:46 +0200
committerJazz <jazzzz@gmail.com>2013-05-21 11:58:04 +0200
commit7421b598714e82a0b923a07817bc35ecdae238fb (patch)
treeb283c4bbdcfc90230f4b163f5e09bfb530014187 /src/shell.js
parentf46a8ba8cadd98ddfb6e13a6c34aa890f3355bfd (diff)
Handle CommonJS exports
Diffstat (limited to 'src/shell.js')
-rw-r--r--src/shell.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shell.js b/src/shell.js
index c8f3644a..5c5beb87 100644
--- a/src/shell.js
+++ b/src/shell.js
@@ -11,6 +11,10 @@ var ENVIRONMENT_IS_WEB = typeof window === 'object';
var ENVIRONMENT_IS_WORKER = typeof importScripts === 'function';
var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER;
+if (typeof exports === "object") {
+ module.exports = Module;
+}
+
if (ENVIRONMENT_IS_NODE) {
// Expose functionality in the same simple way that the shells work
// Note that we pollute the global namespace here, otherwise we break in node