Smooth CoffeeScript

Page 10

Software Smooth CoffeeScript is about the CoffeeScript language, see Quick CoffeeScript

Install or refer to the websites for further installation information. This should get you started: • • • • •

The CoffeeScript language (1.1.3 / MIT) from Jeremy Ashkenas The Underscore library (1.1.0.FIX / MIT) included in CoffeeScript The Coffeekup library (0.3.1 / MIT) from Maurice Machado Translated ws WebSockets (MIT) from Jacek Becela The qc testing library1 (2009 / BSD) from Darrin Thompson

The required libraries have been adapted for standard CoffeeScript and are included in the src/prelude directory. Underscore, ws and Coffeekup are written in CoffeeScript and they are small enough to read and understand in a short time — at least after you have read this book.

◦•◦ To set up your own working environment follow the steps described here or at coffeescript.org2 . If you use Windows then you can adapt the prelude to default to your preferred web browser. You can also find instructions there for how to enable WebSockets if your browser requires it. Then set up your text editor to support CoffeeScript, you can find several on the CoffeeScript wiki. For example to use the TextMate bundle with the cross-platform Sublime Text 2 editor, unpack the bundle in a CoffeeScript directory under Packages. This setup gives you syntax highlighting, code snippets, and code completion. 1

This library is only used to test functionality. The CoffeeScript applications in Smooth CoffeeScript do not depend on it. CoffeeScript is a new language and tools like qc depend on legacy code written in JavaScript. 2 The CoffeeScript examples have been tested on Mac OS X 10.6 and on Windows 7 with the prebuilt node installers.

9


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.