Skip to content

Instantly share code, notes, and snippets.

@bitfidget
Last active August 29, 2015 14:01
Show Gist options
  • Save bitfidget/88b1bf3e7a4e1700b87a to your computer and use it in GitHub Desktop.
Save bitfidget/88b1bf3e7a4e1700b87a to your computer and use it in GitHub Desktop.

#install coffee script in just one directory

npm install coffee-script

add a file to play with in coffee

touch hello.coffee

now to get coffee running

node node_modules/coffee-script/bin/coffee

to run your file

node_modules/coffee-script/bin/coffee hello.coffee (where hello coffee is your script file name)

to compile your file

node_modules/coffee-script/bin/coffee -c hello.coffee (where hello coffee is your script file name)

you can make coffee compiler wait for chnages by adding -w

../../node_modules/coffee-script/bin/coffee -w -c main.coffee

you can also get this to watch a whole directory by using the wildcard *

../../node_modules/coffee-script/bin/coffee -w -c *.coffee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment