mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
don't add the no_wrap key to the options hash unless we're going to use it
This commit is contained in:
@@ -127,7 +127,9 @@ Usage:
|
||||
# Compile a single source file to JavaScript.
|
||||
def compile(script, source='')
|
||||
begin
|
||||
CoffeeScript.compile(script, :no_wrap => @options[:no_wrap])
|
||||
options = {}
|
||||
options[:no_wrap] = true if @options[:no_wrap]
|
||||
CoffeeScript.compile(script, options)
|
||||
rescue CoffeeScript::ParseError => e
|
||||
STDERR.puts e.message(source)
|
||||
exit(1) unless @options[:watch]
|
||||
|
||||
Reference in New Issue
Block a user