There was an error while loading. Please reload this page.
1 parent dfd6025 commit c4a3e17Copy full SHA for c4a3e17
src/coffee-script.coffee
@@ -54,7 +54,10 @@ exports.run = (code, options) ->
54
# Clear the module cache
55
root.moduleCache = {} if root.moduleCache
56
# Compile
57
- root._compile exports.compile(code, options), root.filename
+ if path.extname(root.filename) isnt '.coffee' or require.extensions
58
+ root._compile exports.compile(code, options), root.filename
59
+ else
60
+ root._compile code, root.filename
61
62
# Compile and evaluate a string of CoffeeScript (in a Node.js-like environment).
63
# The CoffeeScript REPL uses this to run the input.
0 commit comments