CoffeeScript in 1, 2, 3...

Ok, this is very easy, but nowhere to be found on the CoffeeScript site and shows how easy it's to get started.
I mean, really, why? If you're going to develop on Javascript, you don't want to "build" your code.
So, all you need is some simple HTML and the following:
<script src="coffee-script.js"></script>
<script type="text/coffeescript">
     alert "Hello CoffeeScript!"
</script>
Now add the "coffee-script.js" file in your path, and open it with your browser. No servers, no compilers, no NodeJS and nothing to install.

2 comentarios:

  1. Hello Alejandro. I've tried what you've described here and doesn't quite work.

    What I did was: download Coffescript from http://jashkenas.github.com/coffee-script/

    Uncompress the file

    Created a hello.html file with the content you've described and open it in Google Chrome.

    Nothing happens.

    What else do I need?

    ResponderEliminar
  2. Looks like I've found what it is. I was trying to use coffee-script.js located in lib/ dir, and what I needed was the one located in extras dir.

    ResponderEliminar