mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
better error warnings on the command line
This commit is contained in:
parent
73aaf127c8
commit
e7e8e243a2
1 changed files with 6 additions and 0 deletions
|
@ -105,12 +105,18 @@ Usage:
|
|||
# Use Narwhal to run an interactive CoffeeScript session.
|
||||
def launch_repl
|
||||
exec "narwhal lib/coffee_script/narwhal/js/launcher.js"
|
||||
rescue Errno::ENOENT
|
||||
puts "Error: Narwhal must be installed to use the interactive REPL."
|
||||
exit(1)
|
||||
end
|
||||
|
||||
# Use Narwhal to compile and execute CoffeeScripts.
|
||||
def run_scripts
|
||||
sources = @sources.join(' ')
|
||||
exec "narwhal lib/coffee_script/narwhal/js/launcher.js #{sources}"
|
||||
rescue Errno::ENOENT
|
||||
puts "Error: Narwhal must be installed in order to execute CoffeeScripts."
|
||||
exit(1)
|
||||
end
|
||||
|
||||
# Print the tokens that the lexer generates from a source script.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue