mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -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:
parent
52700ca922
commit
b58102c514
1 changed files with 3 additions and 1 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue