Quick CoffeeScript Install

CoffeeScript with Node and npm

Node now includes the npm package manager on OS X and Windows. Choose .pkg on OS X and .msi on Windows and install node from http://nodejs.org/dist/v0.6.6/ — See http://nodejs.org/dist/ for newer versions.

Open a command line. On Windows 7 right-click and select ‘Run as Administrator’ when starting the terminal. On Mac OS X you can use ‘sudo’ when starting the npm command.

npm -g install coffee-script

If you get errors from npm then you may have to manually delete files from previous installations. See https://github.com/joyent/node/wiki/Installation. Test installation with

node --version
#    v0.6.6

coffee --version
#    CoffeeScript version 1.2.0

coffee -e "console.log 'Hello World'"
#    Hello World

More information at http://jashkenas.github.com/coffee-script/#installation

Optional Smooth CoffeeScript

To install Smooth CoffeeScript, download and unpack the latest master archive from https://github.com/autotelicum/Smooth-CoffeeScript/archives/master

Open a command line terminal, change directory to Smooth-CoffeeScript/src then

coffee 01-Introduction.coffee
#    Verify that you can see some 55 results.

Optional Test WebSockets

Open a command line terminal, change directory to Smooth-CoffeeScript/src and run:

coffee 10-TestWebSockets.coffee

Verify that your web browser started and you can see: RESPONSE: Cowabunga! If not then open the file prelude/prelude.coffee and see the section User settings. To stop a web server or other script that does not stop by itself press: Ctrl-C.

Formats Markdown PDF HTML Copyright autotelicum © 2554/2011 License CCBYSA