1
0
Fork 0
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:
Jeremy Ashkenas 2009-12-25 19:48:47 -08:00
parent 52700ca922
commit b58102c514

View file

@ -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]