mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
with a working -n --no-wrap option to disable the top-level function safety wrapper
This commit is contained in:
@@ -112,7 +112,7 @@ Usage:
|
||||
# Compile a single source file to JavaScript.
|
||||
def compile(script, source='')
|
||||
begin
|
||||
CoffeeScript.compile(script)
|
||||
CoffeeScript.compile(script, :no_wrap => @options[:no_wrap])
|
||||
rescue CoffeeScript::ParseError => e
|
||||
STDERR.puts e.message(source)
|
||||
exit(1) unless @options[:watch]
|
||||
@@ -160,6 +160,9 @@ Usage:
|
||||
opts.on('-v', '--verbose', 'print at every step of code generation') do |v|
|
||||
ENV['VERBOSE'] = 'true'
|
||||
end
|
||||
opts.on('-n', '--no-wrap', 'suppress the top-level safety function wrapper') do |n|
|
||||
@options[:no_wrap] = true
|
||||
end
|
||||
opts.on_tail('--install-bundle', 'install the CoffeeScript TextMate bundle') do |i|
|
||||
install_bundle
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user