working 'Try CoffeeScript' in the docs

This commit is contained in:
Jeremy Ashkenas
2010-02-13 16:23:03 -05:00
parent a90bf75395
commit 844c756940
5 changed files with 90 additions and 7 deletions

View File

@@ -1,3 +1,4 @@
# Set up for both the browser and the server.
if process?
process.mixin require './nodes'
path: require('path')
@@ -23,6 +24,10 @@ parser.lexer: {
showPosition: -> @pos
}
# Improved error messages.
parser.parseError: (message, hash) ->
throw new Error 'Unexpected ' + hash.token + ' on line ' + hash.line
exports.VERSION: '0.5.0'
# Compile CoffeeScript to JavaScript, using the Coffee/Jison compiler.
@@ -78,7 +83,3 @@ exports.ruby_compile_files: (paths, callback) ->
return unless message
puts message
throw new Error "CoffeeScript compile error"