I am new to coffeescript. I saw a coffeescript video in Rails casts.com. From that episode I understand how to convert the normal Js and Jquery to coffeescript code and the usage of coffeescript.
I am trying to create a coffeescript example without rails. I wetn through the coffeescript site. They first install Node.js. I tried to install node.js in windows and ubuntu, but I had failures. I followed the instruction as per this site:
http://howtonode.org/how-to-install-nodejs#ubuntu
For ubuntu I got “bash: ./configure?: No such file or directory” error when I execute the following command
./configure
Can anyone help me to create simple coffescript example without rails?
One more thing – In Mac “By the help of homebrew I can see the compiled js of coffescript code through compiled and Display Js window”. Are there any options available in windows and ubuntu?
I would bet the easiest way to install Node.js on Ubuntu is through APT:
It probably will get some outdated version but it can be enough for some tests.
If you prefer the latest version (which is a reasonable preference), I bet it would be easier to install Node.js from the dist package. Just copy and paste this on terminal:
This line will:
wget http://nodejs.org/dist/node-v0.5.0.tar.gztar zvxf node-v0.5.0.tar.gzcd node-v0.5.0./configuremakesudo make installThe
&&means “execute the next command if the previous command succeeds” (for examplewget http://nodejs.org/dist/node-v0.5.0.tar.gz && tar zvxf node-v0.5.0.tar.gzmeans that we will download the package withwgetand iff the download succeeds we will unpack the download file withtar. The backslashes (\) are here for allowing us to break all the series of commands in more than one line because, by default, we would have a big line:Then, you can install
npmwith this simple command, found in the ownnpmgithub page:With
npm, it will be too easy to install coffee, as you can see in the CoffeeScript page:Now, just run your tests:
Does it look like to much work? You can try CoffeeScript in the language page. Just click in “Try CoffeeScript” and a console will appear to you.