Skip to content

Commit 3314025

Browse files
committed
Fixes #2681 -- removes old --require hook.
1 parent 7239074 commit 3314025

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

lib/coffee-script/command.js

+2-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/command.coffee

-9
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ SWITCHES = [
4343
[ '--nodejs [ARGS]', 'pass options directly to the "node" binary']
4444
['-o', '--output [DIR]', 'set the output directory for compiled JavaScript']
4545
['-p', '--print', 'print out the compiled JavaScript']
46-
['-r', '--require [FILE*]', 'require a library before executing your script']
4746
['-s', '--stdio', 'listen for and compile scripts over stdio']
4847
['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce']
4948
['-v', '--version', 'display the version number']
@@ -67,7 +66,6 @@ exports.run = ->
6766
return forkNode() if opts.nodejs
6867
return usage() if opts.help
6968
return version() if opts.version
70-
loadRequires() if opts.require
7169
return require('./repl').start() if opts.interactive
7270
if opts.watch and !fs.watch
7371
return printWarn "The --watch feature depends on Node v0.6.0+. You are running #{process.version}."
@@ -165,13 +163,6 @@ compileJoin = ->
165163
joinTimeout = wait 100, ->
166164
compileScript opts.join, sourceCode.join('\n'), opts.join
167165

168-
# Load files that are to-be-required before compilation occurs.
169-
loadRequires = ->
170-
realFilename = module.filename
171-
module.filename = '.'
172-
require req for req in opts.require
173-
module.filename = realFilename
174-
175166
# Watch a source CoffeeScript file using `fs.watch`, recompiling it every
176167
# time the file is updated. May be used in combination with other options,
177168
# such as `--lint` or `--print`.

0 commit comments

Comments
 (0)