diff --git a/documentation/index.html.erb b/documentation/index.html.erb
index 83291904..915a08d9 100644
--- a/documentation/index.html.erb
+++ b/documentation/index.html.erb
@@ -854,7 +854,7 @@ print reverse 'tpircseeffoc'
var source = document.getElementById('repl_source').value;
var js = '';
try {
- js = compile(source, {no_wrap: true});
+ js = CoffeeScript.compile(source, {no_wrap: true});
} catch(error) {
alert(error);
}
diff --git a/index.html b/index.html
index 3b5f334e..2b6f9cd0 100644
--- a/index.html
+++ b/index.html
@@ -1725,7 +1725,7 @@ html = &q
var source = document.getElementById('repl_source').value;
var js = '';
try {
- js = compile(source, {no_wrap: true});
+ js = CoffeeScript.compile(source, {no_wrap: true});
} catch(error) {
alert(error);
}
diff --git a/lib/coffee-script.js b/lib/coffee-script.js
index 5c3c8f60..0637570d 100644
--- a/lib/coffee-script.js
+++ b/lib/coffee-script.js
@@ -7,9 +7,9 @@
lexer = new (require('lexer').Lexer)();
parser = require('parser').parser;
} else {
- this.exports = this;
lexer = new Lexer();
parser = exports.parser;
+ this.exports = (this.CoffeeScript = {});
}
// Thin wrapper for Jison compatibility around the real lexer.
parser.lexer = {
diff --git a/src/coffee-script.coffee b/src/coffee-script.coffee
index beeadd11..51be3dc3 100644
--- a/src/coffee-script.coffee
+++ b/src/coffee-script.coffee
@@ -5,9 +5,9 @@ if process?
lexer: new (require('lexer').Lexer)()
parser: require('parser').parser
else
- this.exports: this
lexer: new Lexer()
parser: exports.parser
+ this.exports: this.CoffeeScript: {}
# Thin wrapper for Jison compatibility around the real lexer.
parser.lexer: {